diff options
-rw-r--r-- | Modules/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c index 00b2e4c..a0b60f5 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, |