<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 16, 2013 at 8:51 AM, Ferrous Cranus <span dir="ltr"><<a href="mailto:nikos.gr33k@gmail.com" target="_blank">nikos.gr33k@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When trying to open an html template within Python script i use a relative path to say go one folder back and open index.html<br>

<br>
f = open( '../' + page )<br>
<br>
How to say the same thing in an absolute way by forcing Python to detect DocumentRoot by itself?<br>
<span class=""><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">I don't think I understand your question.  But, I think your answer is here: <a href="http://docs.python.org/2/library/os.path.html">http://docs.python.org/2/library/os.path.html</a><br clear="all">
</div><div class="gmail_extra"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div>