elementary tuple question. (sorry)

Steven W. Orr steveo at syslang.net
Thu Apr 5 23:08:14 CEST 2007


I have a tuple that I got from struct.unpack. Now I want to pass the data 
from the returned tuple to struct.pack

>>> fmt
'l 10l 11i h 4h c 47c 0l'
>>>struct.pack(fmt, tup)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
struct.error: required argument is not an integer

What's the idiom to pass the data in tup?

TIA

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



More information about the Python-list mailing list