我怎么能__init__.pyc
在这里打开?
>>> import stompservice
<module 'stompservice' from 'C:\Python25\lib\site-packages\stompservice-0.1.0-py2.5.egg\stompservice\__init__.pyc'>
我看到的C:\Python25\lib\site-packages\
只是 .egg 文件,但是包的内部文件在哪里?
例如,如果您想导入 .egg 文件形式的 suds 模块:
在您的 python 脚本中:
egg_path='/home/shahid/suds_2.4.egg'
sys.path.append(egg_path)
import suds
#... rest of code
http://peak.telecommunity.com/DevCenter/PythonEggs
.egg 文件只是重命名的 zip 文件。
使用您的 zip 程序打开 egg,或者只是将扩展名重命名为 .zip,然后解压缩。