"-i" is given. (Yes, I know, giving in to Marc Lemburg who wanted
this :-)
PySys_SetArgv(argc-optind, argv+optind);
+ if ((inspect || (command == NULL && filename == NULL)) &&
+ isatty(fileno(stdin))) {
+ PyObject *v;
+ v = PyImport_ImportModule("readline");
+ if (v == NULL)
+ PyErr_Clear();
+ else
+ Py_DECREF(v);
+ }
+
if (command) {
sts = PyRun_SimpleString(command) != 0;
free(command);
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,