gh-76303: Improve documentation of the -x command line option - #155559
gh-76303: Improve documentation of the -x command line option#155559serhiy-storchaka merged 8 commits into
Conversation
Expand the documentation for the -x command-line option to explain its purpose and usage for turning Python scripts into Windows batch files, with examples of batch file header lines. Closes python#76303.
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
…ove-x-option-docs
Documentation build overview
|
Ah yes, I'd confused it with |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-155565 is a backport of this pull request to the 3.15 branch. |
|
GH-155566 is a backport of this pull request to the 3.14 branch. |
|
GH-155567 is a backport of this pull request to the 3.13 branch. |
…H-155559) (GH-155567) Expand the documentation for the -x command-line option to explain its purpose and usage for turning Python scripts into Windows batch files, with examples of batch file header lines. (cherry picked from commit 4b04d5a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Rory Glenn <glennrory@gmail.com> Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
…H-155559) (GH-155566) Expand the documentation for the -x command-line option to explain its purpose and usage for turning Python scripts into Windows batch files, with examples of batch file header lines. (cherry picked from commit 4b04d5a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Rory Glenn <glennrory@gmail.com> Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Supersedes #144857, which cannot be updated because maintainer edits are not enabled on the author's fork.
The documentation change is by @RoryGlenn. This branch merges main and removes the NEWS entry, which is not needed for a documentation change (as noted by @brianschubert).
@zooba asked why the example uses
%~f0rather than%~dpf0.%~f0already expands to a fully qualified path including the drive letter, so the batch file works when launched from another directory or from another drive: