I have some problems here when I try to use struct.pack from a script. Everything is fine in the interpreter:
>>> import struct
>>> k=2
>>> struct.pack(">b", k)
'\x02'
Now when I do the same from a script I have problems:
k=2
p = struct.pack(">b", k)
print "p is %s"%(p,)
return p
Result:
p is
what am I doing wrong? I really don't understand this and would be glad if somebody could help me. Thanks