Commit 47894d28 authored by Fred Drake's avatar Fred Drake

Don't describe this module as being a popen() wrapper; that's a little

confusing.  This is clearly Unix-specific; label it as such.
parent a694e000
\section{\module{commands} ---
Wrapper functions for \function{os.popen()}.}
Utility functions for external commands}
\declaremodule{standard}{commands}
\platform{Unix}
\modulesynopsis{Utility functions for running external commands.}
\sectionauthor{Sue Williams}{sbw@provis.com}
\modulesynopsis{Wrapper functions for \function{os.popen()}.}
The \module{commands} module contains wrapper functions for
\function{os.popen()} which take a system command as a string and
return any output generated by the command and, optionally, the exit
status.
The \module{commands} module is only usable on systems which support
\function{os.popen()} (currently \UNIX{}). It defines the following
functions:
The \module{commands} module defines the following functions:
\begin{funcdesc}{getstatusoutput}{cmd}
......@@ -22,7 +21,7 @@ return a 2-tuple \code{(\var{status}, \var{output})}. \var{cmd} is
actually run as \code{\{ \var{cmd} ; \} 2>\&1}, so that the returned
output will contain output or error messages. A trailing newline is
stripped from the output. The exit status for the command can be
interpreted according to the rules for the \C{} function
interpreted according to the rules for the C function
\cfunction{wait()}.
\end{funcdesc}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment