[New-bugs-announce] [issue22551] Anything results in a SyntaxError after -i -u -c on 2.7.8 on Windows 7

Taylor Marks report at bugs.python.org
Fri Oct 3 22:39:31 CEST 2014


New submission from Taylor Marks:

On Python 2.7.8, on Windows 7, if I start up the Python interactive console using the flags -i -u -c, nothing else will be considered valid syntax from that point forward.

My understanding is:

-i tells Python to enter interactive mode after it's done running whatever else it's told to do
-u tells Python to not buffer output
-c tells Python to treat any further arguments as Python code and to run it
None of these flags should be causing the issues that I'm seeing, I don't think.

Example:

$ python -i -u -c "print('Test')"
Test
>>> print('verify')
  File "<stdin>", line 1
    print('verify')
                ^
SyntaxError: invalid syntax

This doesn't occur on my computer running OS X Mavericks (10.9.4) and Python 2.7.6 which leads me to think this may be a platform or version specific issue...

----------
components: Interpreter Core, Windows
messages: 228373
nosy: Taylor.Marks
priority: normal
severity: normal
status: open
title: Anything results in a SyntaxError after -i -u -c on 2.7.8 on Windows 7
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22551>
_______________________________________


More information about the New-bugs-announce mailing list