Skip to content

Instantly share code, notes, and snippets.

@Yhg1s
Created September 5, 2014 12:50
Show Gist options
  • Save Yhg1s/3a82539db9fb07c4ae79 to your computer and use it in GitHub Desktop.
Save Yhg1s/3a82539db9fb07c4ae79 to your computer and use it in GitHub Desktop.
% ls foo/
__init__.py __main__.py
% cat foo/__main__.py
import sys
print(repr(sys.path[0]))
% python foo
'foo'
% python -m foo
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment