summaryrefslogtreecommitdiffstats
path: root/Lib/popen2.py
Commit message (Collapse)AuthorAgeFilesLines
* Document that on Unix, the 'cmd' argument to the os.popen2/3/4 andJohannes Gijsbers2004-10-111-22/+44
| | | | | | | | | | 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()}).
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-3/+3
| | | | From SF patch #852334.
* Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3.Martin v. Löwis2003-10-061-1/+4
|
* Use Boolean values for the capturestderr flag.Fred Drake2003-07-071-3/+3
|
* When a previous call to poll() has already seen the process status,Guido van Rossum2003-06-021-4/+5
| | | | | | wait() should not call waitpid() again. Should be backported to 2.2.4.
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | 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.)
* tighten up except - os.close only raises OSErrorSkip Montanaro2002-03-241-1/+1
| | | | see bug 411881
* back out spurious change from 1.22Skip Montanaro2002-03-121-1/+1
|
* Popen3 and Popen4 should be in __all__Skip Montanaro2002-03-121-1/+1
|
* OS/2 EMX port Library and regression test changes:Andrew MacIntyre2002-02-241-1/+1
| | | | | | | | | | | 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
* Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.Martin v. Löwis2001-12-021-1/+2
|
* Whitespace normalization.Tim Peters2001-02-091-1/+1
|
* a few more __all__ listsSkip Montanaro2001-02-071-1/+4
|
* test_popen2 broke on Windows shortly after 2.0b2 was released. Fixed it.Tim Peters2000-10-031-1/+1
|
* popen4(), class Popen4: popen4() support for Unix.Fred Drake2000-09-281-49/+64
| | | | | | | | | | | | popen2(), popen3(): Reversed order of bufsize and mode parameters to comply with what was here before (Python 1.5.2). class Popen3: Factored the __init__() into a more basic initializer and a helper method, to allow some re-use by the Popen4 class. Use os.dup2() instead of os.dup() to create the proper file descriptors in the child process. This closes SourceForge bug #115330 and partially closes #115353.
* The "more" cmd varies across Windows flavors, sometimes adding strayTim Peters2000-09-011-7/+16
| | | | | | | | newlines at the start or end. Fiddle test_popen2 and popen2._test() to tolerate this. Also change all "assert"s in these tests to raise explicit exceptions, so that python -O doesn't render them useless. Also, in case of error, make the msg display the reprs of what we wrote and what we read, so we can tell exactly why it's failing.
* Added os.popen2() and os.popen3() for non-Windows platforms.Fred Drake2000-08-281-3/+5
|
* Changed the popen2.py _test function to use the "more" cmd whenTim Peters2000-08-201-5/+10
| | | | | | | | os.name == "nt". This makes test_popen2 pass under Win98SE. HOWEVER, the Win98 "more" invents a leading newline out of thin air, and I'm not sure that the other Windows flavors of "more" also do that. So, somebody please try under other Windows flavors!
* remove prints of file objects from _testJeremy Hylton2000-07-101-2/+0
|
* - changed the nt.popen2 return values back toFredrik Lundh2000-07-091-10/+25
| | | | | | | | (write, read, ...), based on feedback from GvR. - added tuple-swapping code to popen2.py - fixed some runaway indentation in posixmodule.c
* - added popen.popen2/popen3/popen4 support forFredrik Lundh2000-07-091-15/+39
| | | | | | | | | | | | windows. - added optional mode argument to popen2/popen3 for unix; if the second argument is an integer, it's assumed to be the buffer size. - changed nt.popen2/popen3/popen4 return values to match the popen2 module (stdout first, not stdin).
* More trivial comment -> docstring transformations by Ka-Ping Yee,Guido van Rossum2000-02-041-0/+27
| | | | | | | | | | | | | | | | | | who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. The convention i'm using is to leave credits/version/copyright type of stuff in # comments, and move the rest of the descriptive stuff about module usage into module docstrings. Hope this is okay.
* Calling _cleanup() does not guarantee that all processes haveGuido van Rossum1999-04-201-1/+2
| | | | | | terminated; this makes the final assert in the self-test code fail if the parent runs faster than the children. Fix this by calling wait() on the remaining children instead.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-55/+55
|
* Add optional bufsize argument to various calls so we can make theGuido van Rossum1997-09-291-8/+8
| | | | | | | os.fdopen() calls unbuffered. I presume that it's enough if we can make all three of them (for stdin, stdout, and stderr) unbuffered and don't need to specify different buffer sizes per file -- that would complicate the interface more than I care for.
* The command can now either be a string (as before) or a list ofGuido van Rossum1997-09-181-3/+4
| | | | | arguments for execvp (for those who don't want the shell's argument parsing).
* Rewrite using class, to make waiting for processes possible;Guido van Rossum1997-08-111-31/+79
| | | | by default children are waited for automatically.
* Change inspired by Tommy Burnette to add an interface to get stderr, too.Guido van Rossum1997-04-211-4/+19
|
* pass the command to sh -cGuido van Rossum1995-08-071-1/+1
|
* new filesGuido van Rossum1995-01-121-0/+35