]> granicus.if.org Git - python/commitdiff
Attempt to import readline at interactive startup.
authorGuido van Rossum <guido@python.org>
Tue, 5 Aug 1997 21:34:14 +0000 (21:34 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 5 Aug 1997 21:34:14 +0000 (21:34 +0000)
Modules/main.c

index 00b2e4c0794d08525c25156e8a94a868f7519734..a0b60f573e76647450187ef17fcf3dca47c5f7cb 100644 (file)
@@ -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,