summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 8eded26..1a70b30 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -542,7 +542,8 @@ pymain_repl(PyConfig *config, int *exitcode)
return;
}
- if (!isatty(fileno(stdin))) {
+ if (!isatty(fileno(stdin))
+ || _Py_GetEnv(config->use_environment, "PYTHON_BASIC_REPL")) {
PyCompilerFlags cf = _PyCompilerFlags_INIT;
int run = PyRun_AnyFileExFlags(stdin, "<stdin>", 0, &cf);
*exitcode = (run != 0);