diff options
author | Guido van Rossum <guido@python.org> | 1997-08-05 21:34:14 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-05 21:34:14 (GMT) |
commit | 9b5dbedf4393a938a0f6295d658793d61d75bd16 (patch) | |
tree | 3b40542931972316faf9de8b95aef9010d6bc2a7 /Modules | |
parent | 717c6f95bebcd4693781e25bae3f7f9900cece07 (diff) | |
download | cpython-9b5dbedf4393a938a0f6295d658793d61d75bd16.zip cpython-9b5dbedf4393a938a0f6295d658793d61d75bd16.tar.gz cpython-9b5dbedf4393a938a0f6295d658793d61d75bd16.tar.bz2 |
Attempt to import readline at interactive startup.
Diffstat (limited to 'Modules')
-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, |