[Python-3000] Should package __init__ files include pkgutil.extend_path?

skip at pobox.com skip at pobox.com
Wed Sep 10 00:03:11 CEST 2008


    mal> If all you want to do is get the module into the dbm package, why
    mal> not make this explicit by requiring an import to install the extra
    mal> module ?!

    mal> import install_dbm_sqlite

    mal> which then does:

    mal> import sys, dbm
    mal> import dbm_sqlite

    mal> # Install dbm_sqlite into the dbm package
    mal> sys.modules['dbm.sqlite'] = dbm_sqlite
    mal> dbm.sqlite = dbm_sqlite

I was hoping to make migration from an external module in test to a module
distributed with Python (if it gets that far) as seamless as possible.

Skip


More information about the Python-3000 mailing list