Skip to content

Instantly share code, notes, and snippets.

@cocoatomo
Created June 9, 2012 14:51
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 cocoatomo/2901287 to your computer and use it in GitHub Desktop.
Save cocoatomo/2901287 to your computer and use it in GitHub Desktop.
shell
$ pwd
/tmp/module
$ tree
.
├── __init__.py
├── fluent
│   ├── __init__.py
│   └── sender.py
└── fluent.py
$ cat fluent.py
import sys
sys.path.append('/tmp/module/fluent')
print sys.path
import fluent.sender
print 'fluent'
$ cat fluent/sender.py
print 'fluent.sender'
$ python -V
Python 2.7.3
$ python fluent.py
['/private/tmp/module',(中略), '/tmp/module/fluent']
fluent.sender
fluent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment