[Python-Dev] Putting a builtin module into a package
email@example.com (Skip Montanaro)
Tue, 21 Aug 2001 10:58:34 -0500
Jack> Or should I rename the module to an underscore name and simply put
Jack> a wrapper module in the package?
This seems the safest (and the sanest) to me. I realize you're thinking
mostly about MacOS, but putting object files inside packages that are
otherwise Python code makes the whole package platform-dependent. In
general, it would prevent system administrators from installing the
Lib/site-packages directory tree on a shared filesystem like NFS. In your
package __init__.py file you might want to check for the existence of any
object modules and raise ImportError as early as possible.