problem with ping

Alain Meurant alain.meurant at skynet.be
Thu Aug 1 09:26:53 EDT 2002


Hello

my english is poor, sorry
i try to use  ping.py module by Jeremy Hylton over ipadress 193.95.27.74
when i ping this adress it works good, but when i use with the ping module,
i
have an error

-----
193.95.27.74
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "D:\Projet\ZopeWebSite\Extensions\likiosk.py", line 233, in ?
    borneactive('start')
  File "D:\Projet\ZopeWebSite\Extensions\likiosk.py", line 211, in
borneactive
    p.ping()
  File "D:\Projet\ZopeWebSite\Extensions\likiosk.py", line 158, in ping
    Pinger.ping(self)
  File "D:\Projet\ZopeWebSite\Extensions\likiosk.py", line 103, in ping
    self.wait()
  File "D:\Projet\ZopeWebSite\Extensions\likiosk.py", line 120, in wait
    repip = ip.Packet(pkt)
  File "D:\Projet\Developpement\Recherche\Python\Ping\ip.py", line 79, in
__init__
    self.__disassemble(packet, cksum)
  File "D:\Projet\Developpement\Recherche\Python\Ping\ip.py", line 157, in
__disassemble
    packet = inet.net2iph(raw_packet)
  File "D:\Projet\Developpement\Recherche\Python\Ping\inet.py", line 49, in
net2iph
    return s[:2] + mks(len) + mks(id) + mks(off) + s[8:]
  File "D:\Projet\Developpement\Recherche\Python\Ping\inet.py", line 37, in
mks
    return struct.pack('h', h)
error: short format requires SHRT_MIN<=number<=SHRT_MAX
----

Can you help me ?
It's seems taht there is a problem with struct.pack...

Thanks

Alain Meurant







More information about the Python-list mailing list