How do I use builtin types in C?

Christopher A. Craig ccraig at ccraig.org
Fri Apr 27 09:08:19 EDT 2001


I'm writing an extension module that makes heavy use of
PyLongObjects.  I can't figure out how to, say, divide two
PyLongObjects in C other than using PyRun_SimpleString, which I can't
imagine is the best way to do this.  I would like to use
PyObject_CallMethod, but since long integers are types and not classes
they don't have the __div__ method.

Thanks for any help,

-- 
Christopher A. Craig <ccraig at ccraig.org>
"The shortest distance between two points is usually torn up." Frank Walsh



More information about the Python-list mailing list