Skip to content

Instantly share code, notes, and snippets.

@marceloslacerda
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marceloslacerda/9324582 to your computer and use it in GitHub Desktop.
Save marceloslacerda/9324582 to your computer and use it in GitHub Desktop.
import os, sys
print 'Printing absolute path for "."'
print os.path.abspath('.')
print 'Printing get_script_home() output:'
main = sys.modules['__main__']
# if hasattr(main, '__file__'):
print os.path.dirname(os.path.abspath(main.__file__))
print main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment