From 9b5dbedf4393a938a0f6295d658793d61d75bd16 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 5 Aug 1997 21:34:14 +0000 Subject: Attempt to import readline at interactive startup. --- Modules/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- cgit v0.12