On 24/04/13 17:52, sparkle Plenty wrote:
What is the best way to concatenate packed numeric data?
There are lots of options but one way to produce a byte string from
(semi) arbitrary values is to use the struct module.
It uses a format string to define the data format and lengths and then
substitutes in the values it is given to 'pack'.
PS.
Its a bit like a PICT string in COBOL if your that kind
of mainframer!
If that doesn't help then we will need a bit more detail of the kind of
thing you want. Even a made up example with just a couple of fields...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor