Calling Python functions from C from strings

Moshe Zadka moshez at
Sat Mar 11 19:47:29 CET 2000

On Sat, 11 Mar 2000, Makhno wrote:

> And all I have is the string "mysub", how do I call this function?

Try the following:

m = PyImport...("__main__"); /* not sure exact name of function -- see

Use the abstract protocol to get m.mysub

Now you have a PyObject *, so we solved your problem.

can-anyone-else-tell-i'm-a-mathematician-ly y'rs, Z.
Moshe Zadka <mzadka at>.

More information about the Python-list mailing list