summaryrefslogtreecommitdiffstats
path: root/Lib/popen2.py
Commit message (Collapse)AuthorAgeFilesLines
* 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