[Python-checkins] python/dist/src/Doc/lib libos.tex, 1.142, 1.143 libpopen2.tex, 1.22, 1.23

jlgijsbers at users.sourceforge.net jlgijsbers at users.sourceforge.net
Mon Oct 11 20:12:47 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22303/Doc/lib

Modified Files:
	libos.tex libpopen2.tex 
Log Message:
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()}).



Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- libos.tex	27 Sep 2004 19:54:32 -0000	1.142
+++ libos.tex	11 Oct 2004 18:12:13 -0000	1.143
@@ -361,6 +361,11 @@
 objects should be opened in binary or text mode.  The default value
 for \var{mode} is \code{'t'}.
 
+Also, for each of these variants, 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()}).
+
 These methods do not make it possible to retrieve the return code from
 the child processes.  The only way to control the input and output
 streams and also retrieve the return codes is to use the
@@ -389,15 +394,14 @@
 \begin{funcdesc}{popen4}{cmd\optional{, mode\optional{, bufsize}}}
 Executes \var{cmd} as a sub-process.  Returns the file objects
 \code{(\var{child_stdin}, \var{child_stdout_and_stderr})}.
+Availability: \UNIX, Windows.
+\versionadded{2.0}
+\end{funcdesc}
 
 (Note that \code{\var{child_stdin}, \var{child_stdout}, and
 \var{child_stderr}} are named from the point of view of the child
 process, i.e. \var{child_stdin} is the child's standard input.)
 
-Availability: \UNIX, Windows.
-\versionadded{2.0}
-\end{funcdesc}
-
 This functionality is also available in the \refmodule{popen2} module
 using functions of the same names, but the return values of those
 functions have a different order.

Index: libpopen2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpopen2.tex,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- libpopen2.tex	9 Aug 2004 14:12:05 -0000	1.22
+++ libpopen2.tex	11 Oct 2004 18:12:14 -0000	1.23
@@ -24,6 +24,11 @@
 in binary or text mode.  The default value for \var{mode} is
 \code{'t'}.
 
+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()}).
+
 The only way to retrieve the return codes for the child processes is
 by using the \method{poll()} or \method{wait()} methods on the
 \class{Popen3} and \class{Popen4} classes; these are only available on
@@ -75,7 +80,6 @@
 \versionadded{2.0}
 \end{classdesc}
 
-
 \subsection{Popen3 and Popen4 Objects \label{popen3-objects}}
 
 Instances of the \class{Popen3} and \class{Popen4} classes have the



More information about the Python-checkins mailing list