21

How can I open __init__.pyc here?

 >>> import stompservice
 <module 'stompservice' from 'C:\Python25\lib\site-packages\stompservice-0.1.0-py2.5.egg\stompservice\__init__.pyc'>

All I see in C:\Python25\lib\site-packages\ is the .egg file, but where are the internal files of the package?

asked May 12, 2009 at 6:31

2 Answers 2

34

For example, if you want to import the suds module which is available as .egg file:

In your python script:

egg_path='/home/shahid/suds_2.4.egg'
sys.path.append(egg_path)
import suds
#... rest of code
Marwan Alsabbagh
27.1k10 gold badges59 silver badges66 bronze badges
answered Mar 19, 2013 at 10:54
Sign up to request clarification or add additional context in comments.

Comments

33

http://peak.telecommunity.com/DevCenter/PythonEggs

.egg files are simply renamed zip files.

Open the egg with your zip program, or just rename the extension to .zip, and extract.

answered May 12, 2009 at 6:35

1 Comment

great ! I was not knowing that.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.