summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libos.tex
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-18 22:29:33 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-18 22:29:33 (GMT)
commitf4f4415a18cebdc6e0498c8b178e12978414f5d0 (patch)
treecc1492865323485f5c7e9ec6b8ce365ed54c8c74 /Doc/lib/libos.tex
parent47fab92542133b9a3936f8771560bd6167db9d4d (diff)
downloadcpython-f4f4415a18cebdc6e0498c8b178e12978414f5d0.zip
cpython-f4f4415a18cebdc6e0498c8b178e12978414f5d0.tar.gz
cpython-f4f4415a18cebdc6e0498c8b178e12978414f5d0.tar.bz2
Patch #1393157: os.startfile() now has an optional argument to specify
a "command verb" to invoke on the file.
Diffstat (limited to 'Doc/lib/libos.tex')
-rw-r--r--Doc/lib/libos.tex13
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index a98820c..60a831c 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -1629,13 +1629,21 @@ Availability: Windows.
\versionadded{1.6}
\end{datadesc}
-\begin{funcdesc}{startfile}{path}
-Start a file with its associated application. This acts like
+\begin{funcdesc}{startfile}{path\optional{, operation}}
+Start a file with its associated application.
+
+When \var{operation} is not specified or \code{'open'}, this acts like
double-clicking the file in Windows Explorer, or giving the file name
as an argument to the \program{start} command from the interactive
command shell: the file is opened with whatever application (if any)
its extension is associated.
+When another \var{operation} is given, it must be a ``command verb''
+that specifies what should be done with the file.
+Common verbs documented by Microsoft are \code{'print'} and
+\code{'edit'} (to be used on files) as well as \code{'explore'} and
+\code{'find'} (to be used on directories).
+
\function{startfile()} returns as soon as the associated application
is launched. There is no option to wait for the application to close,
and no way to retrieve the application's exit status. The \var{path}
@@ -1646,6 +1654,7 @@ function doesn't work if it is. Use the \function{os.path.normpath()}
function to ensure that the path is properly encoded for Win32.
Availability: Windows.
\versionadded{2.0}
+\versionadded[The \var{operation} parameter]{2.5}
\end{funcdesc}
\begin{funcdesc}{system}{command}