[Tutor] how to expand "../../myfile"

Alex Kleider akleider at sonic.net
Sat Jul 19 03:33:04 CEST 2014


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.

(python 2.7 on Ubuntu 12.4)

I've searched the os.path and glob modules to no avail.



More information about the Tutor mailing list