[Python-checkins] r43256 - in python/trunk: Lib/popen2.py Misc/NEWS
martin.v.loewis
python-checkins at python.org
Thu Mar 23 19:18:36 CET 2006
Author: martin.v.loewis
Date: Thu Mar 23 19:18:35 2006
New Revision: 43256
Modified:
python/trunk/Lib/popen2.py
python/trunk/Misc/NEWS
Log:
Preserve command name, for later printing of active
commands. If there are active commands when the tests
start, fail, printing these commands.
Modified: python/trunk/Lib/popen2.py
==============================================================================
--- python/trunk/Lib/popen2.py (original)
+++ python/trunk/Lib/popen2.py Thu Mar 23 19:18:35 2006
@@ -39,6 +39,7 @@
specified, it specifies the size of the I/O buffers to/from the child
process."""
_cleanup()
+ self.cmd = cmd
p2cread, p2cwrite = os.pipe()
c2pread, c2pwrite = os.pipe()
if capturestderr:
@@ -186,6 +187,9 @@
__all__.extend(["Popen3", "Popen4"])
def _test():
+ # When the test runs, there shouldn't be any open pipes
+ _cleanup()
+ assert not _active, "Active pipes when test starts " + repr([c.cmd for c in _active])
cmd = "cat"
teststr = "ab cd\n"
if os.name == "nt":
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Thu Mar 23 19:18:35 2006
@@ -483,6 +483,8 @@
Library
-------
+- popen2.Popen objects now preserve the command in a .cmd attribute.
+
- Added the ctypes ffi package.
- email 4.0 package now integrated. This is largely the same as the email 3.0
More information about the Python-checkins
mailing list