Trouble converting hex to decimal?

Miki Tebeka miki.tebeka at zoran.com
Sun Feb 6 02:23:17 EST 2005


Hello Earl,

> I'm trying to process the IP packet length field, as recorded by pcap
> (Ethereal) and recovered using pcapy.  When I slice out those bytes, I
> get a value that shows in '\x00' format, rather than '0x00'.  Neither
> int() nor eval() are working.  How do I handle this?
Try using "array" or "struct" modules.

HTH.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys



More information about the Python-list mailing list