I have a file, for example "something.exe" and I want to find path to this file How can I do this in python?
Perhaps os.path.abspath() would do it:
os.path.abspath()
import os print os.path.abspath("something.exe")
If your something.exe is not in the current directory, you can pass any relative path and abspath() will resolve it.
something.exe
abspath()
1.4m articles
1.4m replys
5 comments
57.0k users