Need help to grok c extension that needs to use callbacks with data

Jim West Jim.West at
Thu Jun 19 23:32:33 CEST 2003

Good day all,

  Ok, I'm new to Python but not to programming in general.

  I have a task where I need to implement a C extension to interface to
a third-party DLL (yes, windoze).  I also need to do this "by hand" as
opposed to using something like SWIG.

  So far all my methods work like a charm.  Now I'm trying to implement
some functions that use a pointer-to-function callback params that have

  I've gone over the "RECIPE" that uses qsort and am trying to
extrapolate that example into what I'm doing and am not being successful
at it.

  Python -> C Extension -> MethodWithCallback (void (*userFunc)(unsigned
char *))

  ...and I want the callback function to be a Python function.

  Any and all help is appreciated.

  Thank you.

- Jim

More information about the Python-list mailing list