On 2014-07-18 18:46, Danny Yoo wrote:
On Fri, Jul 18, 2014 at 6:33 PM, Alex Kleider <aklei...@sonic.net> wrote:
Is there a function that can return the full path name when provided with
something along the lines of
"../../myfile"?

Just to be able to glean the current working directory would suffice. (I could use a shell command if I had to but was hoping it could be done all
within Python.

os.path.abspath() should be able to do it.  See:

    https://docs.python.org/2/library/os.path.html#os.path.abspath

http://www.diveintopython.net/functional_programming/finding_the_path.html

Just what I wanted. (Don't know how I missed it.)  Thank you very much.
alex
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to