Visitar URL original
gh-114673: Docs: Fix os.startfile argument filepath by Jakob-Stadler · Pull Request #112359 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20250604134938/https://github.com/python/cpython/pull/112359/files
Skip to content

gh-114673: Docs: Fix os.startfile argument filepath #112359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4788,7 +4788,7 @@ written in Python, such as a mail server's external command delivery program.
.. availability:: Windows.


.. function:: startfile(path, [operation], [arguments], [cwd], [show_cmd])
.. function:: startfile(filepath, [operation], [arguments], [cwd], [show_cmd])

Start a file with its associated application.

Expand All @@ -4807,7 +4807,7 @@ written in Python, such as a mail server's external command delivery program.
document.

The default working directory is inherited, but may be overridden by the *cwd*
argument. This should be an absolute path. A relative *path* will be resolved
argument. This should be an absolute path. A relative *filepath* will be resolved
against this argument.

Use *show_cmd* to override the default window style. Whether this has any
Expand All @@ -4816,7 +4816,7 @@ written in Python, such as a mail server's external command delivery program.

:func:`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 *path* parameter is relative to the current
the application's exit status. The *filepath* parameter is relative to the current
directory or *cwd*. If you want to use an absolute path, make sure the first
character is not a slash (``'/'``) Use :mod:`pathlib` or the
:func:`os.path.normpath` function to ensure that paths are properly encoded for
Expand All @@ -4826,9 +4826,9 @@ written in Python, such as a mail server's external command delivery program.
function is not resolved until this function is first called. If the function
cannot be resolved, :exc:`NotImplementedError` will be raised.

.. audit-event:: os.startfile path,operation os.startfile
.. audit-event:: os.startfile filepath,operation os.startfile

.. audit-event:: os.startfile/2 path,operation,arguments,cwd,show_cmd os.startfile
.. audit-event:: os.startfile/2 filepath,operation,arguments,cwd,show_cmd os.startfile

.. availability:: Windows.

Expand Down