Importing BitTorrent bencode module
Posted
by bocco
on Stack Overflow
See other posts from Stack Overflow
or by bocco
Published on 2010-04-22T19:50:58Z
Indexed on
2010/04/22
19:53 UTC
Read the original article
Hit count: 275
Hi,
I'm on Mac OS X 10.6. Python is 2.6.1. I've installed bencode module as
sudo easy_install BitTorrent-bencode
It appeared in site-packages
/Library/Python/2.6/site-packages/BitTorrent_bencode-5.0.8-py2.6.egg
But, how to import and use this module?
>>> import bencode
doesn't work...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named bencode
How to import modules from site-packages? How to recognize module name BitTorrent_bencode-5.0.8-py2.6.egg contains?
Thanks
© Stack Overflow or respective owner