Comment by contravariant
7 years ago
You should use '__file__' for increased generality.
Note that you can also import a module and refer to its location on disk as 'module.__file__'. I may or may not have used this to modify a few core python modules in place.
No comments yet
Contribute on Hacker News ↗