From 051a1d41c792beaa6c013776dd0ed169fbb653e9 Mon Sep 17 00:00:00 2001 From: Dmitry Cheryasov Date: Mon, 26 Oct 2009 08:36:05 +0200 Subject: [PATCH] PY-206: add PYTHONUNBUFFERED=1 to newly created run configurations --- .../com/jetbrains/python/run/PythonRunConfiguration.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/src/com/jetbrains/python/run/PythonRunConfiguration.java b/python/src/com/jetbrains/python/run/PythonRunConfiguration.java index 97a59bb919e2..2c35b85e81a5 100644 --- a/python/src/com/jetbrains/python/run/PythonRunConfiguration.java +++ b/python/src/com/jetbrains/python/run/PythonRunConfiguration.java @@ -18,6 +18,7 @@ import org.jetbrains.annotations.NotNull; import java.io.File; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * @author yole @@ -28,6 +29,12 @@ public class PythonRunConfiguration extends AbstractPythonRunConfiguration imple protected PythonRunConfiguration(RunConfigurationModule module, ConfigurationFactory configurationFactory, String name) { super(name, module, configurationFactory); + addDefaultEnvs(); + } + + private void addDefaultEnvs() { + Map envs = getEnvs(); + envs.put("PYTHONUNBUFFERED", "1"); // unbuffered I/O is easier for IDE to handle } protected ModuleBasedConfiguration createInstance() {