Mixing Python and C classes in a module

Stefan Arentz stefan.arentz at gmail.com
Tue Oct 9 10:56:30 EDT 2007


Is it possible to mix classes defined in both Python and C in the same
module? Ideally I would like to be able to do:

 from some.module import MyPythonClass, MyCClass

I guess that would mean that this would look like this on disk:

 some/
   __init__.py
   module.py      (contains MyPythonClass)
   module.so      (contains MyCClass)

But would this work?

 S.



More information about the Python-list mailing list