Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57206 > unrolled thread

python -c commands on windows.

Started byTerry Reedy <tjreedy@udel.edu>
First post2013-10-21 16:47 -0400
Last post2013-10-21 16:47 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  python -c commands on windows. Terry Reedy <tjreedy@udel.edu> - 2013-10-21 16:47 -0400

#57206 — python -c commands on windows.

FromTerry Reedy <tjreedy@udel.edu>
Date2013-10-21 16:47 -0400
Subjectpython -c commands on windows.
Message-ID<mailman.1322.1382388453.18130.python-list@python.org>
Manual says "-c <command>
     Execute the Python code in command. command can be one or more 
statements separated by newlines, with significant leading whitespace as 
in normal module code."

In Windows Command Prompt I get:
C:\Programs\Python33>python -c "a=1\nprint(a)"
   File "<string>", line 1
     a=1\nprint(a)
                 ^
SyntaxError: unexpected character after line continuation character
(Same if I remove quotes.)

How do I get this to work?

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web