Skip to content

Instantly share code, notes, and snippets.

Created Jun 9, 2012
What would you like to do?
$ pwd
$ tree
├── fluent
│ ├──
│ └──
└── plugin
$ cat plugin/
import sys
print sys.path
import fluent.sender
print 'fluent'
$ cat fluent/
print 'fluent.sender'
$ python -V
Python 2.7.2
$ python plugin/
['/tmp/module',(中略), '/tmp/module/fluent']
Traceback (most recent call last):
File "plugin/", line 6, in <module>
import fluent.sender
File "/tmp/module/plugin/", line 6, in <module>
import fluent.sender
ImportError: No module named sender
Copy link

cocoatomo commented Jun 9, 2012


$ cat plugin/
import sys

# sys.path.insert(0, '/private/tmp/module/fluent')
# print sys.path

import imp
                ('', 'r', imp.PY_SOURCE))

# import fluent.sender

print 'fluent'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment