##// END OF EJS Templates
Add flushing to stdout/stderr in system calls.
Brian Granger -
Show More
@@ -8,6 +8,8 b' class ZMQInteractiveShell(InteractiveShell):'
8
8
9 def system(self, cmd):
9 def system(self, cmd):
10 cmd = self.var_expand(cmd, depth=2)
10 cmd = self.var_expand(cmd, depth=2)
11 sys.stdout.flush()
12 sys.stderr.flush()
11 p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
13 p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
12 for line in p.stdout.read().split('\n'):
14 for line in p.stdout.read().split('\n'):
13 if len(line) > 0:
15 if len(line) > 0:
General Comments 0
You need to be logged in to leave comments. Login now