On Thursday, February 12, 2015 at 7:57:48 AM UTC+5:30, Terry Reedy wrote: > 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?
Teaching -- I would like to mail¹ students the interaction so they can pay more attention and less bother about taking notes. > > >> Finish the class and run out usually in a hurry and forget to save the > >> idle interaction window. > > Do you mean the shell window? Yeah > > >> 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.) Yeah thats what I want. In a file-window there is 'ask-to-save' as soon as a single character is typed. I want similar for shell window. As I said if there is a config option for that, thats best. But if I have to put in a few lines in my own idle that's fine too². [BTW I have some other feature requests too. Is this the best forum to talk of them? And thanks for your work on idle :-) ] ¹ I just discovered that mail is passe and they would prefer whatsapp! Well whatever :-) ² I have a class tomorrow! (but I'll try to remember)!! -- https://mail.python.org/mailman/listinfo/python-list