socket script from perl -> python
Josef.Robert.Novak at gmail.com
Fri Feb 8 01:48:09 CET 2008
On Feb 8, 4:01 am, Hrvoje Niksic <hnik... at xemacs.org> wrote:
> kettle <Josef.Robert.No... at gmail.com> writes:
> > # pack $length as a 32-bit network-independent long
> > my $len = pack('N', $length);
> > the sticking point seems to be the $len variable.
> Use len = struct.pack('!L', length) in Python. Seehttp://docs.python.org/lib/module-struct.htmlfor details.
Thanks, that was exactly what I was missing. And thanks for the link
as well! -joe
More information about the Python-list