Bit fields

archer_sully at my-deja.com archer_sully at my-deja.com
Mon Aug 30 14:31:37 EDT 1999


Hi,

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
following:

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

or

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 ;-)

TIA,

Archer Sully
Software Engineer
OnStream, Inc.
<http://www.onstream.com>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list