Author roger.serwy
Recipients martin.panter, rhettinger, roger.serwy, taleinat
Date 2014-02-11.23:48:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <52FAB6D3.3070802@gmail.com>
In-reply-to <1392158591.1.0.704841479634.issue6143@psf.upfronthosting.co.za>
Content
>
> Removing text before "iomark" can be done by using the underlying Text widget directly. See how the Squeezer extension does this in issue1529353. This should simplify the implementation significantly.

I agree that the underlying .delete can be called directly, bypassing 
the ModifiedUndoDelegator in the percolator chain. I have mixed opinions 
about the Percolator, but that's another issue.

>
> 1. Is there a reason that text.dump() isn't called inside ClearWindowDeleteCommand.do()?

There is no compelling reason. I agree that it should be moved to .do()

> 2. What is the purpose of strip_ansi()?

That's an artifact from earlier code for IPython compatibility. The 
colored text prompts in IPython use ANSI escape codes, and the older 
undo code reinserted the text without restoring tags.

Using text.dump() and the restore routine in undo() now restore the tags 
and eliminates the need for strip_ansi(). I haven't removed that old 
code yet.

> 3. Does IDLE support multi-line prompts, or is that just IdleX? As a side note, it seems that in IDLE the debugger will override the prompt with '>>> ' whenever it is shut down (see PyShell.close_debugger); perhaps this is a bug?

IDLE itself does support multi-line prompts. The debugger is a whole 
other can of worms.

> 4. I see ClearWindowDeleteCommand just calls text.delete() and text.insert to modify text before the iomark. Will this work on regular IDLE as well, or this is possible only in IdleX?

It should work on regular IDLE. IdleX wraps the existing CPython IDLE.
History
Date User Action Args
2014-02-11 23:48:03roger.serwysetrecipients: + roger.serwy, rhettinger, taleinat, martin.panter
2014-02-11 23:48:03roger.serwylinkissue6143 messages
2014-02-11 23:48:03roger.serwycreate