23 Feb
2013
23 Feb
'13
8:10 p.m.
#seekto 0x0F08; struct { u8 foobar[5];
This is an array of integers
if setting.value == True: obj.foobar = "\x00\x00\x00\x00\x00" else: obj.foobar = "\x0E\x0F\x10\x11\x15"
This is a string (array) of characters.
ValueError: invalid literal for int() with base 10: '\x0e'
This is complaining that the characters in the string aren't valid "int() with base 10" items. Either pass it the values as integers:
[0x0E, 0x0F, ...]
or change the type of foobar to:
char foobar[5]
and that should do it.
--
Dan Smith
www.danplanet.com
KK7DS