idle py2.7 disappearing output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

idle py2.7 disappearing output

Michael Allan-2
I just installed 2.7, and also tried 3.1 with the same issue - any code more than one line will not show the output, it just instantly runs the code and goes back to a new (blank) prompt line. I am on winxp pro sp2.
 
for example:
 
print 52
 
+ Enter will correctly print '52' then goto a new command prompt
 
however:
x=52
print 52
 
+ Enter will just go right to the new command prompt, printing nothing.
 
However if I add a iterative on the first line like this:
 
for p in range(1):
     x=52
     print x
 
 
I can hit Enter (twice) and it will correctly show the output etc. I have googled all over and found a few references to python bugs (win32all updates etc) but all for older versions. I have been using that 'for' method to do all my assigments in the meantime.
 
(by the way is there a way to get to a new line (CRLF) in the shell without actually running the code yet (hitting Enter)? (so to be able to put a new line of code into the shell directly instead of copy/paste from notepad all the time)
 
-allan

_______________________________________________
IDLE-dev mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/idle-dev
Reply | Threaded
Open this post in threaded view
|

Re: idle py2.7 disappearing output

Terry Reedy
On 8/13/2010 1:06 PM, Michael Allan wrote:
> I just installed 2.7, and also tried 3.1 with the same issue - any code
> more than one line will not show the output, it just instantly runs the
> code and goes back to a new (blank) prompt line. I am on winxp pro sp2.
> for example:
IDLE works fine on windows for most people.

By enter, do you mean type on the keyboard or paste? Pasting only
executes one statement. To paste multiple lines, either use the command
window interpreter or an IDLE edit window (see below).

> print 52
> + Enter will correctly print '52' then goto a new command prompt
> however:
> x=52
> print 52
> + Enter will just go right to the new command prompt, printing nothing.

Copy and paste what you see like this

 >>> x = 52
 >>> print(52)
52
 >>> x = 52; print(52)
52
 >>>

> put a new line of code into the shell directly instead of copy/paste
> from notepad all the time)

Use IDLE's editor to edit code. Use F5 (Run) to run the code. Use
Options/Configure/General to turn off save prompt if you prefer.

PS I think this list is really for development of IDLE, not usage
questions. The latter can just as well go to python-list and get quicker
response.
--
Terry Jan Reedy

_______________________________________________
IDLE-dev mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/idle-dev