Part C, Part Python Module?
Terry Reedy
tjreedy at udel.edu
Tue Feb 25 11:39:14 EST 2003
"John Abel" <john.abel at pa.press.net> wrote in message
news:mailman.1046165167.5769.python-list at python.org...
> Hi,
>
> I am in the process of writing a module, and now need to code some
parts
> of it in C. Is it possible to have them both imported using the
same
> name? Or, will I have to import the C-based module in the Python
module?
sre does the latter. re currently imports sre.py (rather than the
older p(c)re). sre imports sre_parse.py and sre_compile.py.
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