Antoine Pitrou <pit...@free.fr> added the comment: Interestingly, there's already the following code in Modules/main.c:
if ((Py_InspectFlag || (command == NULL && filename == NULL && module == NULL)) && isatty(fileno(stdin))) { PyObject *v; v = PyImport_ImportModule("readline"); if (v == NULL) PyErr_Clear(); else Py_DECREF(v); } ...meaning readline already gets imported automatically when desired. And indeed: $ ./python -S Python 3.3.0a0 (default:50f1922bc1d5, Aug 18 2011, 00:09:47) [GCC 4.5.2] on linux2 >>> import sys >>> sys.modules['readline'] <module 'readline' from '/home/antoine/cpython/default/build/lib.linux-x86_64-3.3-pydebug/readline.cpython-33dm.so'> So perhaps we could simply change this code to import another, private module (e.g. "_setupinteractive.py") which would setup readline and rlcompleter? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com