[Tutor] need help

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Fri Sep 12 16:23:15 EDT 2003


hello everyone,

<rant>
oh my Gosh, don't even get me started on the shortcomings of IDLE 0.8, I
stared at a long block of code for a while before I figured out that
copying from emacs to IDLE meant indents of four spaces were pretty much
useless, and the only way to reliably transplant code copied from emacs
and pasted to IDLE was on emacs to 8 space for the first level indent, 16
for the second, etc, instead of 4 for the first and 8 for the second as
is emacs' default.

Another gripe I have with IDLE is when scrolling history using Alt-P and
Alt-N if you move cursor from end of line to anywhere in the code and you
press Alt-P or Alt-N and then you move the cursor to the end of line to
resume scrolling, you cannot Alt-P or Alt-N anymore and you have to clear
the prompt before you can resume scrolling history.  I emailed this to
idle-dev at python.org as an annoyance a month back but didn't get any
response.

I also wish IDLE had more intuitive copy and paste.  Oftentimes I want to
copy something from IDLE to emacs just by highlighting it like you can in
terminal, and unfortunately IDLE doesn't do that.  This means you must
learn their non-intuitive copy and paste key combinations, another
annoyance.
</rant>

On Fri, 12 Sep 2003, Alan Gauld wrote:

> Hi Valeri,
>
> > Thank you for helping me out. Here is what I enter in my Python
> IDLE on
> > windows xp home edition using livewires 2.0 tutorial pack:
> > >> if 1 < 2:
> >      print 'Something is wrong!'
> >      else:
>
> The else should be under the if not under the print.
> The indentation is all important in Python.
> BUT there is an extra problem which is a "feature"(Or bug!)
> in IDLE:
>
> >>> if 1<2:
>        print 'foo'
> else:
>    print 'bar'
>
> Notice the else has to go right back at the edge because thats
> where IDLE thinks the if is located. Its only the >>> prompt
> that makes it look further in.
>
> If you start python in a DOS box (Go to Start->Run and type python)
> you will find it looks like this:
>
> >>> if 1<2:
> ...   print 'foo'
> ... else:
> ...   print 'bar'
> ...
> foo
> >>>
>
> Note the way it inserts three dots so that everything lines up
> properly? Unfortunately IDLE doesn't do that!
>
> HTH,
>
> Alan G.
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>





More information about the Tutor mailing list