[issue9618] IDLE shell ignores all but first statement

2016-07-20 Thread irdb

Changes by irdb :


--
nosy: +irdb

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9618] IDLE shell ignores all but first statement

2010-08-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I agree: 
Implementation note: PyShell.py hass the following line:
from code import InteractiveInterpreter
That is the base class for InteractiveConsole, the subject of #7741.
PyShell makes it own extension
class ModifiedInterpreter(InteractiveInterpreter):

--
resolution:  - duplicate
status: open - closed
superseder:  - Pasted \n not same as typed \n

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9618] IDLE shell ignores all but first statement

2010-08-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

To be clearer, this issue is an elaboration of the #3559 report that 
statement\nstatement 'does not work' in that it points out that simple 
statement\nsimplestatement silently ignores the second while 
compoundstatement\nsimplestatement is reported as a syntax error. I agree 
that this elaboration should have been included there and I am adding a message 
there.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9618] IDLE shell ignores all but first statement

2010-08-20 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

In interactive mode, multiline statements are terminated with a blank line. 
Your examples lacks that, so the 3rd line is part of the def and lacking the 
proper indent, is indeed a syntax error. You get the same with the standard 
command-line interpreter.
 def f():
... return 42
... f()
  File stdin, line 3
f()
^
SyntaxError: invalid syntax

That said, adding a blank line still gives a syntax error in IDLE, instead of 
ignoring the extra statement, while the interpreter prints 42. IDLE requires an 
explicit blank line from the keyboard to terminate compound statements; pasted 
blank lines do not count #3559 (which I now see you commented on - I should 
have been notified but was not).

I suspect you are correct about the dependency on code.InteractiveConsole(), 
but I have not looked at the IDLE code either.

In the meanwhile, either paste multiple statements in the the real interpreter 
or into an IDLE window and use F5 run.

--
nosy: +terry.reedy
type:  - feature request
versions:  -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9618] IDLE shell ignores all but first statement

2010-08-20 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It seems to me that this bug should be closed as a duplicate of the original 
bug (#3559).  It's the same bug, only the proposed solution is different, 
unless I'm missing something.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9618] IDLE shell ignores all but first statement

2010-08-16 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo, kbk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9618] IDLE shell ignores all but first statement

2010-08-15 Thread Cherniavsky Beni

New submission from Cherniavsky Beni c...@users.sf.net:

[Spinoff of http://bugs.python.org/issue3559]

If you manage to type several simple statements into the prompt (by 
copy-pasting them, using Ctrl+J, or creative deletion), IDLE runs the first one 
and silently ignores the rest:

 x = 1
x = 2
 x
1

Moreover, it doesn't even parse the additional lines:

 x = 3
$...@syntax error?!
 x
3

If the first statement is a compound statement, IDLE refuses with a SyntaxError 
at the begging of the second statement:


 def f():
return 42
f()
SyntaxError: invalid syntax


I believe in both cases the right least-surprise behavior is to run all 
statements.

If not, a clear error explaining that IDLE doesn't support multiple statements 
must be printed.  But I can't see a reason to choose this over making it Just 
Work.


[Implementation: might or might not be related to 
http://bugs.python.org/issue7741]

--
components: IDLE
messages: 114019
nosy: cben
priority: normal
severity: normal
status: open
title: IDLE shell ignores all but first statement
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com