Unpacking a hex value

Matthew Diephouse fokke_wulf at hotmail.com
Fri May 17 21:04:05 EDT 2002


I have the following perl code, which I'm trying to translate to python:

my $out = hex( shift(@_) );
$out = pack("N", $out);

However, I can't figure out how to pack the hex value. I always get an 
error: "required argument is not an integer". Python's pack doesn't have 
an "N" format, but I think I could use "l!" Help? Please?

	md |- m:att d:iephouse




More information about the Python-list mailing list