Hardware API Failing

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Mon Jul 9 08:32:49 EDT 2001


----- Original Message ----- 
From: "Nick Alcorso" <nalcorso at isw.net.au>


> I have written a C wrapper for an API which controls an ISA card and I
> am attempting to create a python module which makes calls to this
> wrapper.
> 
> The module seems to build fine, and work mostly, for example the calls
> to all of the functions in the wrapper work (get called) and so do the
> ones to the Hardware API, however though the calls to the wrapper
> work, the calls to the API from the wrapper for some reason fail when
> they are called from python.

Here is the crux of the problem:  "for some reason".  Use gdb (or just old-
fashioned printf() statements) to trace the call from Python through the
wrapper to the hardware API and back again.

At some point, the program is tripping over itself... you need to find the
rock it's tripping on.

> If I use a test C app and link to the C wrapper then the hardware
> calls work, also if I embed lua and script from that then the calls
> work also.

This seems to indicate a problem with your Python integration.

> I am wondering if there is something in the environment that prevents
> python from controlling hardware?

Nope.

> Any help would be much appreciated.

Hope this helps.

More detail (sample source, tracebacks, etc.) would be helpful.  What
OS are you working with?







More information about the Python-list mailing list