[Idle-dev] The '>>> ' prompt is bad
Terry Reedy
tjreedy at udel.edu
Thu Jun 21 06:34:46 CEST 2012
On 6/20/2012 9:16 PM, Roger Serwy wrote:
> Tkinter's Text widget allows for separate font configuration based on
> tags, meaning that the ps1 and ps2 prompts can be tagged with
> fixed-width fonts, while the rest of the window may contain
> variable-width fonts.
>
> The IPython's Qt Console has Qt's text widget equivalent and extra code
> to make sure that the ps1 and ps2 prompts don't get modified. Adding the
> ps2 prompt should be "simple." The ModifiedUndoDelegator in PyShell.py
> can be modified to prevent changes to prompt tags, as well as handle
> multi-line pasting of code (filling in the ps2 prompts as needed). The
> "runit" method in PyShell.py would need to be modified to remove and
> ps2 text from "line".
It already ignores ps1 text on the first line.
> I could write a patch to allow ps2 prompts if there's any serious interest.
Definitely. Would it be possible to have ps2s omitted from selections if
ps1/2 is omitted on the first line of a selection?
--
Terry Jan Reedy
More information about the IDLE-dev
mailing list