[pywin32-checkins] pywin32/win32/test testall.py,1.6.2.3,1.6.2.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-11 04:24:30
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26596 Modified Files: Tag: py3k testall.py Log Message: use subprocess if available Index: testall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -C2 -d -r1.6.2.3 -r1.6.2.4 *** testall.py 6 Dec 2008 01:48:27 -0000 1.6.2.3 --- testall.py 11 Dec 2008 04:24:25 -0000 1.6.2.4 *************** *** 26,35 **** self.argv = argv def __call__(self): ! # subprocess failed in strange ways for me?? ! fin, fout, ferr = os.popen3(" ".join(self.argv)) ! fin.close() ! output = fout.read() + ferr.read() ! fout.close() ! rc = ferr.close() if rc: base = os.path.basename(self.argv[1]) --- 26,44 ---- self.argv = argv def __call__(self): ! try: ! import subprocess ! p = subprocess.Popen(self.argv, ! stdout=subprocess.PIPE, ! stderr=subprocess.STDOUT) ! p.wait() ! rc = p.returncode ! output = p.stdout.read() ! except ImportError: ! # py2.3? ! fin, fout, ferr = os.popen3(" ".join(self.argv)) ! fin.close() ! output = fout.read() + ferr.read() ! fout.close() ! rc = ferr.close() if rc: base = os.path.basename(self.argv[1]) |