Commit Graph

41 Commits

Author SHA1 Message Date
Georg Brandl
8d01bb2b19 Use os.closerange() in popen2. 2008-02-23 22:09:24 +00:00
Georg Brandl
c45346f57a #1591: Clarify docstring of Popen3. 2008-01-06 14:33:52 +00:00
Neal Norwitz
42dd86b8e2 Deprecate os.popen* and popen2 module in favor of the subprocess module. 2007-05-11 06:57:33 +00:00
Collin Winter
1b4145dbb3 Patch #1676994: Refactor test_popen2 to use unittest. 2007-03-16 21:13:35 +00:00
Georg Brandl
4085f1499c Fix check for empty list (vs. None). 2006-07-21 17:36:31 +00:00
Peter Astrand
ff355f1ada Applied patch #1506758: Prevent MemoryErrors with large MAXFD. 2006-06-22 20:21:26 +00:00
Georg Brandl
cfecd599b6 Guard the _active.remove() call to avoid errors when there is no _active list. 2006-05-25 18:44:09 +00:00
Martin v. Löwis
b95caff56c Clarify cases when waitpid might not return self.pid. 2006-03-24 08:26:26 +00:00
Martin v. Löwis
478c82d30f Bug #1183780: Add Popen objects to _active only in __del__.
Cleanup terminated processes as well.
Add cmd attribute to Popen4.
2006-03-24 08:14:54 +00:00
Martin v. Löwis
bd8dbab247 Preserve command name, for later printing of active
commands. If there are active commands when the tests
start, fail, printing these commands.
2006-03-23 18:18:35 +00:00
Andrew M. Kuchling
bfd7d6a0ea Fix typo 2005-02-10 13:24:50 +00:00
Johannes Gijsbers
9fc9789a0d Document that on Unix, the 'cmd' argument to the os.popen2/3/4 and
popen2.popen2/3/4 functions can be a sequence. All texts are a variation on the
following:

On \UNIX, \var{cmd} may be a sequence, in which case arguments will be passed
directly to the program without shell intervention (as with
\function{os.spawnv()}). If \var{cmd} is a string it will be passed to the shell
(as with \function{os.system()}).
2004-10-11 18:12:20 +00:00
Walter Dörwald
70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Martin v. Löwis
f563c8bbac Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3. 2003-10-06 21:34:33 +00:00
Fred Drake
b5aa407196 Use Boolean values for the capturestderr flag. 2003-07-07 21:36:19 +00:00
Guido van Rossum
3800ef7ae2 When a previous call to poll() has already seen the process status,
wait() should not call waitpid() again.

Should be backported to 2.2.4.
2003-06-02 19:12:01 +00:00
Walter Dörwald
65230a2de7 Remove uses of the string and types modules:
x in string.whitespace => x.isspace()
type(x) in types.StringTypes => isinstance(x, basestring)
isinstance(x, types.StringTypes) => isinstance(x, basestring)
type(x) is types.StringType => isinstance(x, str)
type(x) == types.StringType => isinstance(x, str)
string.split(x, ...) => x.split(...)
string.join(x, y) => y.join(x)
string.zfill(x, ...) => x.zfill(...)
string.count(x, ...) => x.count(...)
hasattr(types, "UnicodeType") => try: unicode except NameError:
type(x) != types.TupleTuple => not isinstance(x, tuple)
isinstance(x, types.TupleType) => isinstance(x, tuple)
type(x) is types.IntType => isinstance(x, int)

Do not mention the string module in the rlcompleter docstring.

This partially applies SF patch http://www.python.org/sf/562373
(with basestring instead of string). (It excludes the changes to
unittest.py and does not change the os.stat stuff.)
2002-06-03 15:58:32 +00:00
Skip Montanaro
1c90d7ab3c tighten up except - os.close only raises OSError
see bug 411881
2002-03-24 20:48:26 +00:00
Skip Montanaro
57fd45ea07 back out spurious change from 1.22 2002-03-12 19:48:03 +00:00
Skip Montanaro
59b40c0828 Popen3 and Popen4 should be in __all__ 2002-03-12 19:16:19 +00:00
Andrew MacIntyre
5cef57131f OS/2 EMX port Library and regression test changes:
Lib/
    os.py
    os2emxpath.py   // added - OS/2 EMX specific path manipulation routines
    popen2.py
    site.py
  Lib/test/
    test_fcntl.py
    test_longexp.py
2002-02-24 05:32:32 +00:00
Martin v. Löwis
95b057e3ea Patch #487784: Support Unicode commands in popen3/4 handling on UNIX. 2001-12-02 13:32:15 +00:00
Tim Peters
658cba6706 Whitespace normalization. 2001-02-09 20:06:00 +00:00
Skip Montanaro
352674d01c a few more __all__ lists 2001-02-07 23:14:30 +00:00
Tim Peters
d215218178 test_popen2 broke on Windows shortly after 2.0b2 was released. Fixed it. 2000-10-03 23:07:13 +00:00