From: Guido van Rossum Date: Tue, 5 Aug 1997 21:34:14 +0000 (+0000) Subject: Attempt to import readline at interactive startup. X-Git-Tag: v1.5a3~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b5dbedf4393a938a0f6295d658793d61d75bd16;p=python Attempt to import readline at interactive startup. --- diff --git a/Modules/main.c b/Modules/main.c index 00b2e4c079..a0b60f573e 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -229,6 +229,14 @@ Py_Main(argc, argv) fclose(fp); } } + if (isatty(fileno(stdin))) { + PyObject *v; + v = PyImport_ImportModule("readline"); + if (v == NULL) + PyErr_Clear(); + else + Py_DECREF(v); + } } sts = PyRun_AnyFile( fp,