Python equivilent of pack()?
Skip Montanaro
skip at mojam.com
Tue Aug 24 14:43:55 EDT 1999
Bit> My question is this: is there a functional equivilent to the Perl
Bit> pack() and unpack() functions in Python? Or even better, is there
Bit> an easier way to do what I want with Python? If not, how many
Bit> people think this would be a useful addition to the Python standard
Bit> library?
Bit,
Check out the struct module docs at:
http://www.python.org/doc/lib/module-struct.html
It'll most likely do just what you want. It even calls its methods "pack"
and "unpack", so it should be fairly familiar to your Perl neurons...
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/~skip/
847-971-7098 | Python: Programming the way Guido indented...
More information about the Python-list
mailing list