Bit fields

archer_sully at archer_sully at
Mon Aug 30 14:31:37 EDT 1999


I'm writing some extensions to set up a general SCSI oriented
test platform in Python.  Obviously there's a certain amount
of C work that has to be done, but I would like to do one of the

A. access bit fields from a C struct that is returned to Python
as a string


B. encapsulate the structs as classes with all of the methods
implemented in C (this would appear to be possible but the
doc is mute).

A is preferable, because I wouldn't have to do write a new
class every time the firmware guys come up with a new struct
that is made up entirely of bit fields.  B is ok, because at
least I have emacs to generate the code for me.

Of course, I may be all wet with this question, in which case
I humbly ask for enlightenment ;-)


Archer Sully
Software Engineer
OnStream, Inc.

Sent via
Share what you know. Learn what you don't.

More information about the Python-list mailing list