Trying to get pcap working

Michael Matthews mikesafh at gmail.com
Tue Jun 17 12:43:10 EDT 2008


Hello,

I'm fairly new to Python, and have run into dead ends in trying to
figure out what is going on.  The basic thing I am trying to do is get
pylibpcap working on a Python installation.  More precisely, I want to
get it working on an ActiveState Python installation.

I have it working on cygwin (Windows XP). I was hoping to just be able
to copy the pcap.py and _pcapmodule.dll file to a directory in the
ActiveState install's sys.path (they are both in C:\Python25\Lib\site-
packages).  When I do this, it finds pcap.py just fine, but then
errors with:

C:\Python25\Lib\site-packages>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pcap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python25\Lib\site-packages\pcap.py", line 7, in <module>
    import _pcap
ImportError: No module named _pcap

(The build and initial install was done under cygwin because I could;
the goal is to "package" this up into a zip file and install it on
some more servers.)

Getting python to access the _pcapmodule.dll seems to be key; why does
the cygwin python installation work and ActiveState does not?  Is
there some sort of central known-DLL repository somewhere?

Thanks for any help you can give.

Michael Matthews



More information about the Python-list mailing list