mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Attempt to import readline at interactive startup.
This commit is contained in:
parent
717c6f95be
commit
9b5dbedf43
1 changed files with 8 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue