[issue6052] for-loop doesn't work with -c

2009-05-18 Thread R. David Murray
R. David Murray added the comment: The error message is correct: your example is invalid python code. Try it in a file and you will get the same error message. Check the documentation of the '-c' option to learn how to correctly code your example. -- nosy: +r.david.murray resolution:

[issue6052] for-loop doesn't work with -c

2009-05-18 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : Hello! I found this problem: $ python3 -c 'import sys; for line in sys.stdout: pass' File "", line 1 import sys; for line in sys.stdout: pass ^ SyntaxError: invalid syntax Without import-statement this work great. Also code '