I love the pathlib.Path
api and use it a lot for quick cli tools. Especially with typer. I have a few tightly related questions:
-
is the de facto standard for stdin. Is that the same under Windows?pathlib.Path
object (or actually the {POSIX,Windows}Path it automatically becomes) to represent stdin?There is no cross-platform pseudo file name for standard input and standard output.
In POSIX, it's /dev/stdin
for standard input and /dev/stdout
for standard output, although many CLI tools would accept -
in the command line arguments as a shorthand for standard input or standard output.
In Windows, it's CONIN$
for standard input and CONOUT$
for standard output, or simply CON
for both standard input and standard output.