Need help creating variable for unpack statement
alfred6465 at my-deja.com
alfred6465 at my-deja.com
Mon Oct 23 15:51:15 EDT 2000
I'm new to Python and have a dumb question (please be patient with
me!!!!)....
I have a variable called length which contains a value of 6 and a
variable called fmt which contains 's'.
length = 6
fmt = 's'
How do I combine those into one variable with the value of '6s'.
Once I have a variable called fmt holding the value of 6s, I want to
place it into a struct.unpack statement (see below).
test = struct.unpack(fmt, f[38:44])
Thanks for the help in advance.
Alfred
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list