Creating a subpackage of a built-in module?

Derek Peschel dpeschel at eskimo.com
Wed Aug 23 05:56:39 EDT 2006


Can I add my own subpackages to modules that are written in C?

I've put /Users/dpeschel/lib/python into my PYTHONPATH variable.
Inside there, I've created a termios directory, and inside termios
I've created __init__.py and signals.py.  Now "import termios.signals"
works, but "import termios" only appears to work (it has no effect).
Do I have to do something sneaky in __init__.py to find the original
module, or is there a better way?



More information about the Python-list mailing list