Issue 33877: Doc: Delete UNIX qualification for script running instructions (original) (raw)

The paragraph reads:

Under Unix, a complete program can be passed to the interpreter in three forms: with the -c string command line option, as a file passed as the first command line argument, or as standard input. If the file or standard input is a tty device, the interpreter enters interactive mode; otherwise, it executes the file as a complete program.

This is slightly confusing because a complete programs cannot be passed all at once if the file (regular or stdin) is interactive.

Not being a Windows expert, I was curious whether the standard input part is true for Win 10. Indeed, both "python con:" and "python <con:" (as well as just "python") start Python in interactive mode, which both "python file" and "python < file" executes the file.

Ned, is the statement untrue for MacOS, or does 'Unix' always include Macs? In other words, should we add 'Windows' or delete 'Unix'?

The statement is true for macOS (note macOS is the correct current styling per Apple); in general, macOS is a UNIX platform as far as Python is concerned. So, yes, it appears the documentation there could be simplified by eliminating the platform distinction.