On Thursday, April 21, 2016 at 1:07:55 PM UTC-7, Ron Chatterjee wrote: > > You may be able to use numpy to do something like this. > > import numpy as np > > value = np.ctypeslib.as_array(value).tolist() > > This doesn't look like it is what I'm after. This appears to be a way to treat a C array as a Python array, which is a different problem. Of course, I've skimmed the numpy documentation, so if I've missed something, please point it out.
/dps > > > > > > > On Thursday, April 21, 2016 at 3:39:03 PM UTC-4, Dave S wrote: >> >> Does someone here have a reference for how to convert a C *.h* file full >> of structs into either Python objects or a sequence of byte/short/word >> reads? >> >> I'm trying to read a blob whose internal structure is specified by >> structs in a .h file. I did a manual process one time (the sequence >> technique), but the structs continue to evolve (and why wouldn't they?), >> and I'd like to automate the process a bit. Something that can read the .h >> and give me stuff to paste into my wrapper code. >> >> Thanks. >> >> Dave >> /dps >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

