idle feature request

Terry Reedy tjreedy at udel.edu
Wed Feb 11 21:27:25 EST 2015


On 2/11/2015 1:00 PM, Mark Lawrence wrote:
> On 11/02/2015 13:11, Rustom Mody wrote:
>> Context:
>> I am using idle for taking python classes.

Teaching or taking?

>> Finish the class and run out usually in a hurry and forget to save the
>> idle interaction window.

Do you mean the shell window?

>> Would like to save it so that I can mail it to the students.

Then save it.  What am I not understainding? Your problem scenario is 
not clear to me.  See below for a possible description that I do understand.

>> In emacs I could set a hook to make arbitrary 'buffers' like the
>> python-idle
>> shell become 'saving-buffers' like typical file buffers.
>> ie in emacs like most other editors, a modified file is ask-to-save

That is true in Idle as well.

>> The same can be setup for other (non-file) buffers like a python
>> interaction shell

I have never used emacs so I do not understand your reference thereto. 
In Windows, the interactive console history cannot be saved except by 
awkwardly selecting and cutting.  Idle does allow the shell contents to 
be saved.

>> Can I do the same for idle.

"Same what?" is the question.

> If there isn't an enhancement request on the bug tracker for this please
> raise one, that way this doesn't get lost.

Let us clarify the request here first.

If one saves the shell with 'save as', the filename is added to the 
title bar.  If one does something more, the name in bracketed with *s to 
indicate the the memory buffer has been changed since it was last saved. 
  This is the same as regular edit windows.

However, when one quits, then, unlike a regular edit window, there is no 
ask-to-save warning.  Is this what you want?  This would seem reasonable 
and likely easy.  (I would, however, not want the prompt when the buffer 
has not been saved -- or this could be a configuration option.)

-- 
Terry Jan Reedy





More information about the Python-list mailing list