struct.pack returns nothing [3]

Andrés Martinelli andres at
Mon Mar 19 23:32:41 CET 2007

I'm using the example of the site : 

import struct
pack('hhl', 1, 2, 3)

I should get:
>>> '\x00\x01\x00\x02\x00\x00\x00\x03'
I get an empty line, a '\n': 
>>> _

I know it should work. The code is OK. 
What could be wrong? Doesnt find the library module?
I repeat that the unpack works ok.
I use debian etch and sarge. Same situation in both of them.

Andrés M.

More information about the Python-list mailing list