Given a path such as \"mydir/myfile.txt\", how do I find the file\'s absolute path relative to the current working directory in Python? E.g. on Windows, I might
\"mydir/myfile.txt\"
In case someone is using python and linux and looking for full path to file:
>>> path=os.popen("readlink -f file").read() >>> print path abs/path/to/file