Closed GoogleCodeExporter closed 9 years ago
something like this might suffice...
--- pypcap-1.1/pcap.pyx 2005-10-16 18:00:11.000000000 -0500
+++ pypcap-1.1-new/pcap.pyx 2007-06-12 11:11:41.000000000 -0500
@@ -285,7 +285,7 @@
<unsigned char *>&ctx)
if ctx.got_exc:
exc = sys.exc_info()
- raise exc[0], exc[1], exc[2]
+ raise OSError, "%s [%s]" % (exc[0], exc[1]), exc[2]
return n
def loop(self, callback, *args):
Original comment by yard...@gmail.com
on 12 Jun 2007 at 4:14
The problem is the pcap.c is shipped in the tarball. On linux, deleting pcap.c
then
running
make all
solves the problem.
Arthur
Original comment by art...@honeynet.org.uk
on 11 Aug 2007 at 5:10
yep, sorry about that Arthur - pcap.c in the 1.1 release generated by an older
version of Pyrex, pre-Python 2.5. it took some time for the exception handling
to be
updated properly in Pyrex for Python 2.5, and it was not originally done in a
backward-compatible manner.
you'll note that the binary MacOS X and win32 builds for Python 2.5 work fine -
for
those builds, i used the updated Pyrex, but used the older version for Python
2.3 and
2.4.
i committed a pcap.c generated with the latest Pyrex back in March, but never
cut a
new release. i'll go ahead and do that soon...
Original comment by dugsong
on 16 Aug 2007 at 3:01
This doesn't appear to be fixed on OS X yet.
I had to download the source of Pyrex from
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ and install this
module as root on my system (apparently Pyrex doesn't play nicely with virtual
environments and complains like this: ImportError: No module named
Pyrex.Compiler.Main) before running `make all` to generate a new pcap.c file.
After generating new pcap.c file I was able to install the module correctly.
Original comment by shols...@gmail.com
on 15 Jul 2013 at 12:04
Original issue reported on code.google.com by
art...@honeynet.org.uk
on 21 Apr 2007 at 2:43