Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # For more information, see
- # http://docs.python.org/reference/datamodel.html?highlight=__file__
- # Current module name
- print __file__
- # module1.py
- # Path of the current module
- import os
- print os.path.abspath(os.path.dirname(__file__))
- # /home/myusername/projects/project1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement