Index: popen2.py =================================================================== RCS file: /cvsroot/jython/jython/Lib/popen2.py,v retrieving revision 2.6 diff -u -r2.6 popen2.py --- popen2.py 18 Apr 2003 05:47:27 -0000 2.6 +++ popen2.py 23 Feb 2004 20:52:56 -0000 @@ -72,7 +72,7 @@ else: self._childerr = None import threading - childWaiterLock = threading.Lock() + self.childWaiterLock = threading.Lock() if bufsize > 0: self._tochild = BufferedOutputStream( self._tochild, bufsize ) @@ -285,30 +285,6 @@ # if _active: # raise ValueError("_active not empty") print "All OK" - - msg = "hello" - f = popen( ["d:\\winnt\\system32\\cmd.exe", "/c", "echo", msg] ) - got = f.read().strip() - print "popen:", got - assert got == msg - - for func in popen2, popen3, popen4: - f = func( ["d:\\winnt\\system32\\cmd.exe", "/c", "echo", msg] ) - got = f[0].read().strip() - print func, got - assert got == msg - - p = Popen3( ["d:\\winnt\\system32\\cmd.exe"], 1 ) - p.tochild.write( "echo hello\n" ) - p.tochild.write( "zip -h\n" ) - p.tochild.write( "notacomand\n" ) - p.tochild.write( "exit\n" ) - p.tochild.close() - - print "fromchild:", p.fromchild.read() - print "childerr (error message from the notacommand above):", \ - p.childerr.read() - print p.poll() p = Popen3( "more" ) p.tochild.write( "This is\na test of\nwriting\n" )