Created
June 9, 2012 15:13
-
-
Save melpon/2901389 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pwd | |
/tmp/module | |
$ tree | |
. | |
├── fluent | |
│ ├── __init__.py | |
│ └── sender.py | |
└── plugin | |
├── __init__.py | |
└── fluent.py | |
$ cat plugin/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.2 | |
$ python plugin/fluent.py | |
['/tmp/module',(中略), '/tmp/module/fluent'] | |
Traceback (most recent call last): | |
File "plugin/fluent.py", line 6, in <module> | |
import fluent.sender | |
File "/tmp/module/plugin/fluent.py", line 6, in <module> | |
import fluent.sender | |
ImportError: No module named sender |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
無理矢理