Part C, Part Python Module?

Terry Reedy tjreedy at
Tue Feb 25 17:39:14 CET 2003

"John Abel" <john.abel at> wrote in message
news:mailman.1046165167.5769.python-list at
> Hi,
> I am in the process of writing a module, and now need to code some
> of it in C.  Is it possible to have them both imported using the
> name?  Or, will I have to import the C-based module in the Python

sre does the latter.  re currently imports (rather than the
older p(c)re).  sre imports and
sre_compile imports builtin (C-coded) _sre.  (Which makes bug tracing
fun, I sure.)

Terry J. Reedy

More information about the Python-list mailing list