Hi everybody,

lately I have been working a bit on implementing some things within the RAPI2 
library. Since I started working on the SynCE-KDM program, i needed some of 
the rapi2 functionality to be exported to python.

Now my question is about the style that we should use for the functions within 
the python wrapper, should we make a 'direct' copy of the c-library, 
implementing all functions that are present in c with the same name (i.e. 
there is a function CeRegQueryInfoKey( ... ) within the C library, should we 
have exactly the same function CeRegQueryInfoKey( ... ) within the python 
wrapper? First of all, is this even possible, since you define the functions 
in the pyrapi.pyx file first to be C functions, and later on you would 
declare exactly the same python name (somebody with more pyrex knowledge, 
please enlighten me ;) ) I was told by John Carr that this approach would not 
be very pythonic though. Since I started 1.5 weeks ago with python, I can't 
say much about it yet ;)

Or should we wrap all of the c library functions, but with a different prefix.

Or the final option, should we create some 'higher level' library, that will 
take away some of the hassle of using RAPI? One example of this would be the 
feature of copying files to/from the device; with rapi you have to do this in 
blocks of 64KB, with a higher level function we could already abstract from 
this. Or a function that returns all possible storage devices on the device, 
including information about the free/total sizes (what I am working on now, 
is working in C already by combining some existing rapi functions).

Hopefully this can start a bit of a discussion about how to go on with 
implementing pyrapi, since currently it looks to me as a bit of a 
on-demand-programmed library, we implement what we need and give it a name 
that looks reasonable. 

Hope for some input.

Regards,

Guido Diepen
-- 
Aviation is proof that given the will, we have the 
capacity to achieve the impossible.
     --Eddie Rickenbacker

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to