python / cpython

The Python programming language
https://www.python.org
Other
62.91k stars 30.13k forks source link

File extension for scripts on windows is unclear #88593

Open 31426d62-917e-4df0-9106-4d313ba6a303 opened 3 years ago

31426d62-917e-4df0-9106-4d313ba6a303 commented 3 years ago
BPO 44427
Nosy @maltekliemann

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = None created_at = labels = ['type-feature', '3.9', 'docs'] title = 'File extension for scripts on windows is unclear' updated_at = user = 'https://github.com/maltekliemann' ``` bugs.python.org fields: ```python activity = actor = 'maltekliemann' assignee = 'docs@python' closed = False closed_date = None closer = None components = ['Documentation'] creation = creator = 'maltekliemann' dependencies = [] files = [] hgrepos = [] issue_num = 44427 keywords = [] message_count = 1.0 messages = ['395875'] nosy_count = 2.0 nosy_names = ['docs@python', 'maltekliemann'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue44427' versions = ['Python 3.9'] ```

31426d62-917e-4df0-9106-4d313ba6a303 commented 3 years ago

It is common practice to use no extension for python scripts on UNIX. In 3.8.1.4., it is hinted that a script with a shebang line can be executed on windows only if the file extension of the script is associated with the python launcher.

I'm not sure where the right place is, but I suggest clearly stating that this is a critical requirement. As scripts on UNIX usually don't use file extensions, using these scripts without further modification is not possible cross-platform.