struct.pack returns nothing [3]

Andrés Martinelli andres at lacordilleraandina.com.ar
Mon Mar 19 23:32:41 CET 2007


I'm using the example of the site
http://docs.python.org/lib/module-struct.html : 

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.

Thanks.
Andrés M.



More information about the Python-list mailing list