[PYTHONMAC-SIG] U vraagt, wij draaien: calling C routines from Python

Jack Jansen Jack.Jansen@cwi.nl
Mon, 17 Feb 1997 17:46:58 +0100


Folks, as there seemed to be quite a lot of interest in a way to call
random toolbox routines and I had a bit of spare time anyway I went
and implemented a first try. The calldll module allows you to give a
sort-of prototype for a C routine, and then lets you call it from
Python dynamically.

It is currently PowerPC only, I would definitely like it if any of the
cfm68k users looked at porting it to that platform. The distribution
contains the dynamically loadable module for Python 1.4, and also the
source, the project file and (minimal) test and example code. (as an
aside: if you want to do the cfm68k port: the relevant info on 68K C
calling sequences is best described in IM: PowerPC software, of all
places:-)

Download the code via http://www.cwi.nl/~jack/macpython.html or
ftp://ftp.cwi.nl/pub/jack/python/mac, as usual.

Don't use the module in production yet (hehe:-), but please give it a
test run and tell me which features are missing, and whether there's
anything I should change in the interface (the parameter specification
comes to mind).

Guido: I expect that with this module you'll have Grail supporting
Netscape plugins by the end of the week, is that reasonable? :-)

I am now off to try and cure the terrible headache those 20-odd lines
in cdc_call() have caused,
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl      | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 

_______________
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________