From 8a081a103f645d87adb77fbbc66e5fd37249f7b7 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 11 Aug 2016 14:21:56 +0100 Subject: [PATCH] Python 2.4 open() vs. file(). --- econtext/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/econtext/core.py b/econtext/core.py index e023963c..05b8b139 100644 --- a/econtext/core.py +++ b/econtext/core.py @@ -672,9 +672,8 @@ class ExternalContext(object): def _SetupStdio(self): self.stdout_log = IoLogger(self.broker, 'stdout', 1) self.stderr_log = IoLogger(self.broker, 'stderr', 2) - # Reopen with line buffering. - sys.stdout = open('/dev/stdout', 'w', 1) + sys.stdout = file('/dev/stdout', 'w', 1) fp = file('/dev/null') try: