[Python-checkins] r55247 - python/trunk/Doc/lib/libos.tex python/trunk/Doc/lib/libpopen2.tex
neal.norwitz
python-checkins at python.org
Fri May 11 09:13:35 CEST 2007
Author: neal.norwitz
Date: Fri May 11 09:13:30 2007
New Revision: 55247
Modified:
python/trunk/Doc/lib/libos.tex
python/trunk/Doc/lib/libpopen2.tex
Log:
Deprecate os.popen* and popen2 module in favor of the subprocess module. (forgot the doc)
Modified: python/trunk/Doc/lib/libos.tex
==============================================================================
--- python/trunk/Doc/lib/libos.tex (original)
+++ python/trunk/Doc/lib/libos.tex Fri May 11 09:13:30 2007
@@ -361,9 +361,8 @@
errors), \code{None} is returned.
Availability: Macintosh, \UNIX, Windows.
-The \module{subprocess} module provides more powerful facilities for
-spawning new processes and retrieving their results; using that module
-is preferable to using this function.
+\deprecated{2.6}{This function is obsolete. Use the
+ \module{subprocess} module.}
\versionchanged[This function worked unreliably under Windows in
earlier versions of Python. This was due to the use of the
@@ -380,10 +379,9 @@
\end{funcdesc}
There are a number of different \function{popen*()} functions that
-provide slightly different ways to create subprocesses. Note that the
-\module{subprocess} module is easier to use and more powerful;
-consider using that module before writing code using the
-lower-level \function{popen*()} functions.
+provide slightly different ways to create subprocesses.
+\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
+ Use the \module{subprocess} module.}
For each of the \function{popen*()} variants, if \var{bufsize} is
specified, it specifies the buffer size for the I/O pipes.
@@ -400,8 +398,7 @@
These methods do not make it possible to retrieve the exit status from
the child processes. The only way to control the input and output
streams and also retrieve the return codes is to use the
-\class{Popen3} and \class{Popen4} classes from the \refmodule{popen2}
-module; these are only available on \UNIX.
+\refmodule{subprocess} module; these are only available on \UNIX.
For a discussion of possible deadlock conditions related to the use
of these functions, see ``\ulink{Flow Control
@@ -411,6 +408,8 @@
\begin{funcdesc}{popen2}{cmd\optional{, mode\optional{, bufsize}}}
Executes \var{cmd} as a sub-process. Returns the file objects
\code{(\var{child_stdin}, \var{child_stdout})}.
+\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
+ Use the \module{subprocess} module.}
Availability: Macintosh, \UNIX, Windows.
\versionadded{2.0}
\end{funcdesc}
@@ -418,6 +417,8 @@
\begin{funcdesc}{popen3}{cmd\optional{, mode\optional{, bufsize}}}
Executes \var{cmd} as a sub-process. Returns the file objects
\code{(\var{child_stdin}, \var{child_stdout}, \var{child_stderr})}.
+\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
+ Use the \module{subprocess} module.}
Availability: Macintosh, \UNIX, Windows.
\versionadded{2.0}
\end{funcdesc}
@@ -425,6 +426,8 @@
\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})}.
+\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
+ Use the \module{subprocess} module.}
Availability: Macintosh, \UNIX, Windows.
\versionadded{2.0}
\end{funcdesc}
Modified: python/trunk/Doc/lib/libpopen2.tex
==============================================================================
--- python/trunk/Doc/lib/libpopen2.tex (original)
+++ python/trunk/Doc/lib/libpopen2.tex Fri May 11 09:13:30 2007
@@ -5,6 +5,7 @@
\modulesynopsis{Subprocesses with accessible standard I/O streams.}
\sectionauthor{Drew Csillag}{drew_csillag at geocities.com}
+\deprecated{2.6}{This module is obsolete. Use the \module{subprocess} module.}
This module allows you to spawn processes and connect to their
input/output/error pipes and obtain their return codes under
More information about the Python-checkins
mailing list