summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-05 21:34:14 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-05 21:34:14 (GMT)
commit9b5dbedf4393a938a0f6295d658793d61d75bd16 (patch)
tree3b40542931972316faf9de8b95aef9010d6bc2a7
parent717c6f95bebcd4693781e25bae3f7f9900cece07 (diff)
downloadcpython-9b5dbedf4393a938a0f6295d658793d61d75bd16.zip
cpython-9b5dbedf4393a938a0f6295d658793d61d75bd16.tar.gz
cpython-9b5dbedf4393a938a0f6295d658793d61d75bd16.tar.bz2
Attempt to import readline at interactive startup.
-rw-r--r--Modules/main.c8
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,