python command (2 and 3) ignores extra -c arguments - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: News and Discussions (https://python-forum.io/forum-31.html) +--- Thread: python command (2 and 3) ignores extra -c arguments (/thread-20692.html) |
python command (2 and 3) ignores extra -c arguments - Skaperen - Aug-25-2019 both the python3 and python2 commands (at least in Ubuntu 18.04) takes (or ignores) an extra -c argument and only executes the first one. it should give an error message about the extras if it is wrong to use them. i was hoping it would be an easy way to give it another "line" of code to run.
RE: python command (2 and 3) ignores extra -c arguments - ichabod801 - Aug-25-2019
RE: python command (2 and 3) ignores extra -c arguments - Skaperen - Aug-26-2019 i tried it with ; but it would not work with just any code. nested stuff was not working. it works when the string -c gets has real \n .
RE: python command (2 and 3) ignores extra -c arguments - ichabod801 - Aug-26-2019 Geez; if you're putting \n's in the string to handle nesting, just make a dummy file and run it. RE: python command (2 and 3) ignores extra -c arguments - Skaperen - Aug-27-2019 what if i'm using -c because there is no writable file system available? can python(3) read a script from a pipe? |