##// END OF EJS Templates
Use os.popen4() so that the error output of the running...
walter.doerwald -
Show More
@@ -1301,19 +1301,20 b' class ix(Table):'
1301 1301 """
1302 1302 def __init__(self, cmd):
1303 1303 self.cmd = cmd
1304 self._pipe = None
1304 self._pipeout = None
1305 1305
1306 def __xiter__(self, mode):
1307 self._pipe = os.popen(self.cmd)
1308 for l in self._pipe:
1306 def __xiter__(self, mode="default"):
1307 (_pipein, self._pipeout) = os.popen4(self.cmd)
1308 _pipein.close()
1309 for l in self._pipeout:
1309 1310 yield l.rstrip("\r\n")
1310 self._pipe.close()
1311 self._pipe = None
1311 self._pipeout.close()
1312 self._pipeout = None
1312 1313
1313 1314 def __del__(self):
1314 if self._pipe is not None and not self._pipe.closed:
1315 self._pipe.close()
1316 self._pipe = None
1315 if self._pipeout is not None and not self._pipeout.closed:
1316 self._pipeout.close()
1317 self._pipeout = None
1317 1318
1318 1319 def __xrepr__(self, mode):
1319 1320 if mode == "header" or mode == "footer":
@@ -1,3 +1,8 b''
1 2006-07-14 Walter Doerwald <walter@livinglogic.de>
2
3 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
4 error output of the running command doesn't mess up the screen.
5
1 6 2006-07-13 Walter Doerwald <walter@livinglogic.de>
2 7
3 8 * IPython/Extensions/ipipe.py (isort): Make isort usable without
General Comments 0
You need to be logged in to leave comments. Login now