[issue40568] Modify -c command-line option to accept multiple inputs

Serhiy Storchaka report at bugs.python.org
Fri May 22 13:19:27 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It would be breaking change.

In addition to multiline strings you can use \n with $' on Posix:

python -c $'with open("somefile.txt") as f:\n  s = f.read()\n  print(len(s))'

Maybe there is similar feature on Windows, but in any case the command line interface on Windows is far from user friendly.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40568>
_______________________________________


More information about the Python-bugs-list mailing list