Skip to content

Display the invoked executable name when displaying help #91818

@scrummyin

Description

@scrummyin

Feature or enhancement

Display the invoked executable name such as python3 or python.exe so users can copy and paste without having to translate, for tools such as ast and json.tool.

Pitch

The example below shows a before usage of json.tool and an after below.

$ python3 -m json.tool -h
usage: python -m json.tool [-h] [--sort-keys] [--json-lines] [infile] [outfile]

becomes

$ python3 -m json.tool -h
usage: python3 -m json.tool [-h] [--sort-keys] [--json-lines] [infile] [outfile]

This is more friendly to users on windows because of the .exe extension and to *nix users who's OS might install python 3 at python3 and have an old python2 version somewhere else. Or as we move into the future and some OS drop python2 but never rectify python point to python3.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions