Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77036

help! about pypcap.dispatch

X-Received by 10.66.65.75 with SMTP id v11mr2797858pas.30.1409049871661; Tue, 26 Aug 2014 03:44:31 -0700 (PDT)
X-Received by 10.50.67.98 with SMTP id m2mr513678igt.15.1409049871508; Tue, 26 Aug 2014 03:44:31 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!r2no7565570igi.0!news-out.google.com!aw9ni2igc.0!nntp.google.com!r2no7565564igi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Tue, 26 Aug 2014 03:44:31 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=124.117.216.180; posting-account=8so8DwoAAAA90MxCWCQPqVY-uTYQwKMH
NNTP-Posting-Host 124.117.216.180
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <89a67381-4e4f-4ae0-83e3-59ca48bdf619@googlegroups.com> (permalink)
Subject help! about pypcap.dispatch
From doit4um@gmail.com
Injection-Date Tue, 26 Aug 2014 10:44:31 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:77036

Show key headers only | View raw


Hi,
 
   I'm using Python 2.7.6 in Centos 6.5. 
   
   I have defined  
   "p = pcap.pcap(timeout_ms=1000)
    def function(timestamp,pkt,*args):
   "
   and try to run "p.dispatch(-1,function)"

   and I got this:
   p.dispatch(-1,function)
   File "pcap.pyx", line 296, in pcap.pcap.dispatch (pcap.c:3182)
  TypeError: raise: exception class must be a subclass of BaseException

   why this happened? Anybody know how to solve it?

   thanks!

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

help! about pypcap.dispatch doit4um@gmail.com - 2014-08-26 03:44 -0700
  Re: help! about pypcap.dispatch Chris Angelico <rosuav@gmail.com> - 2014-08-27 00:45 +1000
    Re: help! about pypcap.dispatch Simmen <doit4um@gmail.com> - 2014-08-26 20:03 -0700
    Re: help! about pypcap.dispatch Simmen <doit4um@gmail.com> - 2014-08-26 21:24 -0700

csiph-web