[Idle-dev] IDLE shell: Moving prompts to a side-bar

Beni Cherniavsky-Paskin beni.cherniavsky at gmail.com
Sat Nov 2 18:40:21 EDT 2019


Note that unlike terminal, multi-line commands in IDLE are already not
copyable into doctests - one needs to manually add `... ` continuation
prompts, which is O(n-1) manual work per command; additionally having to
insert `>>> ` ups that to O(n) which is not much worse.

In an ideal world, it would behave as an html table, allowing dragging
mouse from sidebar into editing area to select both columns together.  Not
sure that's possible in Tk.

On Sat, 2 Nov 2019, 12:29 Tal Einat, <taleinat at gmail.com> wrote:

> Thanks for expressing your opinions on this, Guido, André and Jeremy, and
> I'm happy that you all are in support!
>
> On Sat, Nov 2, 2019 at 6:58 AM Guido van Rossum <guido at python.org> wrote:
>
>>
>> In issue 37903, RH appears to be requiring support for doctests.
>> (Interestingly, in issue 7676 he wishes the IDLE shell wouldn't use tabs,
>> which you're going to support.) I'm a little confused by his comments about
>> doctests. IMO copying from a "doctest" in the docs to the shell is not
>> affected -- the problem there is purely that you have to work hard to avoid
>> also copying the ">>>" and (especially) "..." prompts into the shell. That
>> seems to me to be the main thing people would do with doctests, and it's
>> unaffected. It's true that recreating a doctest from an IDLE shell session
>> is a little harder -- but a nice fallback is to use the python binary
>> itself, which has the exact behavior you'd want. So I don't see this as a
>> reason not to backport. (This also seems pretty niche. I don't know if he
>> can back up his claim that doctests have become more popular.)
>>
>
> My reading of Raymond's comment related to doctests was also that he was
> worried about losing the ability to create doctests simply by copy/pasting
> from an IDLE shell session. ISTM that moving the prompts to a side-bar
> would make it only slightly more difficult, though perhaps significantly
> difficult for novices. If this becomes a common request we could simply add
> a "copy for doctest" context menu option - I'd be happy to implement that
> myself.
>
> - Tal
> _______________________________________________
> IDLE-dev mailing list
> IDLE-dev at python.org
> https://mail.python.org/mailman/listinfo/idle-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/idle-dev/attachments/20191103/9b42f807/attachment.html>


More information about the IDLE-dev mailing list