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

2020-05-23 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: -DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-05-22 Thread Serhiy Storchaka
Serhiy Storchaka 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

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

2020-05-22 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: +DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-05-08 Thread Zachary Ware
Zachary Ware added the comment: This can be accomplished already by just including newlines in the string: $ cat multiline_python_bash_script.sh #!/bin/bash python3 -c ' from math import * print(e**(1j * pi)) import sys print(sys.argv)' echo "here's some random text" > somefile.txt

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

2020-05-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: @rhettinger can you clarify how does this arguments act on argv? Should they be hidden like the first argument, or should they remain visible as a passing argument? $ python -c 'import sys;print(sys.argv)' ['-c'] $ python -c

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

2020-05-08 Thread Raymond Hettinger
New submission from Raymond Hettinger : It would be nice to write this: $ python -c 'from math import *' 'print(e**(1j * pi))' Instead of this: $ python -c 'from math import *; print(e**(1j * pi))' (-1+1.22464679915e-16j) That would also make it possible input an indented block: