Btrieve/C-extension question
vincent wehren
v.wehren at home.nl
Thu Jun 19 05:13:31 EDT 2003
Hi,
I need to write a Python extension that wraps several C functions to
access Pervasive/Btrieve files (of a specific format - for a specific
purpose - ODBC
access is not an option) on win32.
Btrieve keeps track of file positions using a so-called position block.
This is a 128-byte block of memory (e.g. UBYTE pos_blk[128]).
Single file access works like a charm, as the pos_blk is managed entirely on
the C-side.
Now I want to be able to work with multiple files, so I my guess is, (apart
from some other things) I need to
return the position block to the Python caller and pass it as argument to
any next function
call (first, next, prev, etc).
Is it sensible to pass such a block of memory to Python and back?
If so, what is the best way to go about this, I.O.W, how do I pass such a
block of memory
to Python and back (unchanged).
Any pointers would be much appreciated.
Regards,
Vincent Wehren
More information about the Python-list
mailing list