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?

Alex
  • 43,191
  • 44
  • 96
  • 127

2 Answers2

33

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
  • 25,364
  • 9
  • 55
  • 65
Mohammad Shahid Siddiqui
  • 3,730
  • 2
  • 27
  • 12
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.

Unknown
  • 45,913
  • 27
  • 138
  • 182