[issue12238] Readline module loading in interactive mode

Antoine Pitrou report at bugs.python.org
Tue Jun 7 15:21:54 CEST 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> The difference is that logging is not imported at startup. So, however
> os (and friends, there are a lot of modules in sys.modules at startup)
> is imported, it is different from how readline.so is imported.

For the record, os is imported by the _io module:

    /* put os in the module state */
    state->os_module = PyImport_ImportModule("os");
    if (state->os_module == NULL)
        goto fail;

(in Modules/_io/_iomodule.c)

This probably happens before sys.path is
adjusted/tweaked/fixed/garbled/whatever.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12238>
_______________________________________


More information about the Python-bugs-list mailing list