I have an app which allows users to write models in python. The app
loads the python module dynamically, and check to see which functions
the user has implemented and calls them form the worker. These user
functions get called over many data sets.

Scheduling Loop -> Model Container [python] -> User defined functions [python]

I would like to change it to:

Scheduling Loop -> Model Container [cython] -> User defined functions [cython]

I would like all the user functions to be cdef and also most of the
model container will be cdef functions except for the one that gets
called from Scheduling Loop. I have a a couple of questions:

1. The user will submit the source in text through a webservices
request. I know how to save the code to disk and compile it with
cython. However, what I'm not clear on is how my cdef Model Container
can figure out what functions the user has defined or not?

cdef user_func1():
   pass

cdef user_func1():
   pass


The in the model container:
- How would I load the model container dynamically? (is the same way
that I do in python?)
- How would I check if the loaded module has functions user_func1 and
user_func2 defined?
- How would I call them using the c interface from model container
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to