From nad at acm.org Mon Sep 9 21:20:54 2013 From: nad at acm.org (Ned Deily) Date: Mon, 09 Sep 2013 12:20:54 -0700 Subject: [Idle-dev] Python 3.4.0 alpha 2 available Message-ID: I would like call your attention to the latest alpha release of Python 3.4.0 and a new batteries-included feature for OS X users. For 3.4.0.a2, the python.org 64-bit/32-bit installer now includes its own private version of Tcl/Tk 8.5.14 so it is no longer necessary to install a third-party version of Tcl/Tk 8.5 to workaround the problematic system versions shipped in OS X 10.6+. Unlike Pythons from previous installers, only this private version will be used by tkinter and IDLE. It will have no effect on or be affected by any other versions of Tcl/Tk installed on your system, such as ActivelTcl 8.5.x or Apple 8.5.x. Since this is a new feature and somewhat experimental, it may change prior to the official release of Python 3.4.0, planned for 2014-02. There will be other OS X installer-related changes coming. Please report any problems or issues you encounter to the Python bug tracker. Thanks! http://www.python.org/download/releases/3.4.0/ http://www.python.org/download/mac/tcltk/ http://bugs.python.org -- Ned Deily, nad at acm.org From paul.james.barry at gmail.com Mon Sep 9 21:54:55 2013 From: paul.james.barry at gmail.com (Paul Barry) Date: Mon, 9 Sep 2013 20:54:55 +0100 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: I've been running Alpha 1 (and now Alpha 2). Things with IDLE are much improved in the 3.4 release. Congrats to all involved. This is good news. :-) Paul. On 9 September 2013 20:20, Ned Deily wrote: > I would like call your attention to the latest alpha release of Python > 3.4.0 and a new batteries-included feature for OS X users. For > 3.4.0.a2, the python.org 64-bit/32-bit installer now includes its own > private version of Tcl/Tk 8.5.14 so it is no longer necessary to install > a third-party version of Tcl/Tk 8.5 to workaround the problematic system > versions shipped in OS X 10.6+. Unlike Pythons from previous > installers, only this private version will be used by tkinter and IDLE. > It will have no effect on or be affected by any other versions of Tcl/Tk > installed on your system, such as ActivelTcl 8.5.x or Apple 8.5.x. > > Since this is a new feature and somewhat experimental, it may change > prior to the official release of Python 3.4.0, planned for 2014-02. > There will be other OS X installer-related changes coming. Please > report any problems or issues you encounter to the Python bug tracker. > Thanks! > > http://www.python.org/download/releases/3.4.0/ > http://www.python.org/download/mac/tcltk/ > http://bugs.python.org > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > https://mail.python.org/mailman/listinfo/idle-dev > -- Paul Barry, w: http://paulbarry.itcarlow.ie - e: paul.barry at itcarlow.ie Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bruce_Sherwood at ncsu.edu Mon Sep 9 23:38:05 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Mon, 9 Sep 2013 15:38:05 -0600 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: IDLE is very much not improved on Windows. I installed 64-bit Python 3.4 Alpha 2 on Windows 7: python-3.4.0a2.amd64.msi I started up IDLE and examined the IDLE configuration options. I set and applied Startup Preferences to Open Shell Window and Autosave Preferences to No Prompt. There were no detailed options for Run options introduced by Guilleherme Polo (If file has never been saved, Prompt to Save or No prompt; If file has been saved before Prompt to Save or no prompt; On first error Bring shell forward or Do nothing). I created a new edit window and wrote a tiny test program and tried to run by pressing F5. As expected but not desired, I was required to save the file, which I did. The IDLE window immediately quit. If I restart IDLE I now start in an edit window, but when I try to open a file IDLE immediately quits. Bruce Sherwood -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.james.barry at gmail.com Tue Sep 10 10:10:12 2013 From: paul.james.barry at gmail.com (Paul Barry) Date: Tue, 10 Sep 2013 09:10:12 +0100 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: I should've mentioned that I'm running Alpha 2 on Mac OS X (10.6.8). I've just tried the process described by Bruce... it does not cause the crashes as Bruce describes (on Windows) on my Mac. Of course, this unfortunately doesn't help Bruce, but hopefully is of interest to the idle-devs. Paul. On 9 September 2013 22:38, Bruce Sherwood wrote: > IDLE is very much not improved on Windows. I installed 64-bit Python 3.4 > Alpha 2 on Windows 7: > > python-3.4.0a2.amd64.msi > > I started up IDLE and examined the IDLE configuration options. I set and > applied Startup Preferences to Open Shell Window and Autosave Preferences > to No Prompt. There were no detailed options for Run options introduced by > Guilleherme Polo (If file has never been saved, Prompt to Save or No > prompt; If file has been saved before Prompt to Save or no prompt; On first > error Bring shell forward or Do nothing). > > I created a new edit window and wrote a tiny test program and tried to run > by pressing F5. As expected but not desired, I was required to save the > file, which I did. The IDLE window immediately quit. If I restart IDLE I > now start in an edit window, but when I try to open a file IDLE immediately > quits. > > Bruce Sherwood > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > https://mail.python.org/mailman/listinfo/idle-dev > > -- Paul Barry, w: http://paulbarry.itcarlow.ie - e: paul.barry at itcarlow.ie Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Tue Sep 10 20:48:25 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Tue, 10 Sep 2013 14:48:25 -0400 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: On 9/9/2013 5:38 PM, Bruce Sherwood wrote: > IDLE is very much not improved on Windows. Ned and Paul were talking about 3.4 Mac OS X improvements. I do not remember there being any Windows-specific fixes since the April/May releases. I hope there will be some before 3.4.0, 3.3.3, and 2.7.6 are released. > I installed 64-bit Python 3.4 Alpha 2 on Windows 7: > python-3.4.0a2.amd64.msi Ditto. It works fine for me, so there is something different about your system. I routinely run Idle from the current repository to make sure it is working and to get the benefit of the latest patches. > I started up IDLE and examined the IDLE configuration options. I set and > applied Startup Preferences to Open Shell Window and Autosave > Preferences to No Prompt. My configuration was already set that way. I thought [x] Open Shell is default, but maybe not. I know [x] No Prompt is not default, but I set that long ago and it carried over. > There were no detailed options for Run options > introduced by Guilleherme Polo (If file has never been saved, Prompt to > Save or No prompt; If file has been saved before Prompt to Save or no > prompt; On first error Bring shell forward or Do nothing). I do not know what this is about. I presume you are talking about a proposed patch that has not been applied here. I do not remember seeing it. I looked for an issue but could not find one. > I created a new edit window and wrote a tiny test program and tried to > run by pressing F5. As expected but not desired, I was required to save > the file, which I did. I gather that you are saying that the NoPrompt configuration change does not take effect immediately, but you wish it did. I agree that this would be good. > The IDLE window immediately quit. If I restart > IDLE I now start in an edit window, but when I try to open a file IDLE > immediately quits. To see and report a traceback, start Idle in a console window with 'python -m idlelib' or in a console interpreter with 'import idlelib.idle'. -- Terry Jan Reedy From Bruce_Sherwood at ncsu.edu Wed Sep 11 00:20:37 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Tue, 10 Sep 2013 16:20:37 -0600 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: Here's what I see. Make any sense? C:\Python34>python -m idlelib Exception in Tkinter callback Traceback (most recent call last): File "C:\Python34\lib\tkinter\__init__.py", line 1475, in __call__ return self.func(*args) File "C:\Python34\lib\idlelib\MultiCall.py", line 166, in handler r = l[i](event) File "C:\Python34\lib\idlelib\ScriptBinding.py", line 127, in run_module_event return self._run_module_event(event) File "C:\Python34\lib\idlelib\ScriptBinding.py", line 138, in _run_module_event filename = self.getfilename() File "C:\Python34\lib\idlelib\ScriptBinding.py", line 190, in getfilename self.editwin.io.save(None) File "C:\Python34\lib\idlelib\IOBinding.py", line 335, in save self.save_as(event) File "C:\Python34\lib\idlelib\IOBinding.py", line 357, in save_as self.updaterecentfileslist(filename) File "C:\Python34\lib\idlelib\IOBinding.py", line 521, in updaterecentfileslist self.editwin.update_recent_files_list(filename) File "C:\Python34\lib\idlelib\EditorWindow.py", line 915, in update_recent_files_list menu.delete(0, END) # clear, and rebuild: File "C:\Python34\lib\tkinter\__init__.py", line 2739, in delete if 'command' in self.entryconfig(i): File "C:\Python34\lib\tkinter\__init__.py", line 2749, in entryconfigure return self._configure(('entryconfigure', index), cnf, kw) File "C:\Python34\lib\tkinter\__init__.py", line 1247, in _configure self.tk.call(_flatten((self._w, cmd)))): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 14: invalid start byte -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bruce_Sherwood at ncsu.edu Wed Sep 11 00:25:19 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Tue, 10 Sep 2013 16:25:19 -0600 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: It occurs to me to ask: I have several versions of Python on my computer, and I'm using VIDLE with the others (mainly 2.7). Is there just one IDLE configuration file for all Pythons, in which case maybe there's a conflict between what Python 3.4 IDLE and Python 2.7 VIDLE expect? As for the following, I don't know how/when these important features implemented by Polo got lost: > There were no detailed options for Run options > introduced by Guilleherme Polo (If file has never been saved, Prompt to > Save or No prompt; If file has been saved before Prompt to Save or no > prompt; On first error Bring shell forward or Do nothing). > I do not know what this is about. I presume you are talking about a proposed patch that has not been applied here. I do not remember seeing it. I looked for an issue but could not find one. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Thu Sep 12 00:28:41 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Wed, 11 Sep 2013 18:28:41 -0400 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: On 9/10/2013 6:25 PM, Bruce Sherwood wrote: > It occurs to me to ask: I have several versions of Python on my > computer, As do I. > and I'm using VIDLE with the others (mainly 2.7). I am not, and know nothing about it. > Is there just one IDLE configuration file for all Pythons, The *default* configuration is in each .../idlelib/. My one set of user configuration files is in c:/Users/Terry/.idlerc/. The three non-empty files are text files. I suspect that breakpoints.lst would be also if not empty. > in which case maybe there's a conflict between what > Python 3.4 IDLE and Python 2.7 VIDLE expect? If VIDLE also uses .idlerc, there could be. What do your two config files contain? -- Terry Jan Reedy From tjreedy at udel.edu Thu Sep 12 01:30:01 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Wed, 11 Sep 2013 19:30:01 -0400 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: On 9/10/2013 6:20 PM, Bruce Sherwood wrote: > Here's what I see. Make any sense? > > C:\Python34>python -m idlelib Do you see Idle at all? If so, what do you see, and did you click anything to get this? > Exception in Tkinter callback Exceptions in callbacks are nuisance ;-) > Traceback (most recent call last): > File "C:\Python34\lib\tkinter\__init__.py", line 1475, in __call__ > return self.func(*args) > File "C:\Python34\lib\idlelib\MultiCall.py", line 166, in handler > r = l[i](event) > File "C:\Python34\lib\idlelib\ScriptBinding.py", line 127, in > run_module_event > return self._run_module_event(event) > File "C:\Python34\lib\idlelib\ScriptBinding.py", line 138, in > _run_module_event I believe this implements 'Run (F5)', which suggests that you invoked this. > filename = self.getfilename() > File "C:\Python34\lib\idlelib\ScriptBinding.py", line 190, in getfilename > self.editwin.io.save(None) filename = self.editwin.io.filename if not self.editwin.get_saved(): autosave = idleConf.GetOption('main', 'General', 'autosave', type='bool') if autosave and filename: self.editwin.io.save(None) It sees that you set autosave True. I presume None means do not ask for a name since there already is one. > File "C:\Python34\lib\idlelib\IOBinding.py", line 335, in save > self.save_as(event) > File "C:\Python34\lib\idlelib\IOBinding.py", line 357, in save_as > self.updaterecentfileslist(filename) > File "C:\Python34\lib\idlelib\IOBinding.py", line 521, in > updaterecentfileslist > self.editwin.update_recent_files_list(filename) > File "C:\Python34\lib\idlelib\EditorWindow.py", line 915, in > update_recent_files_list > menu.delete(0, END) # clear, and rebuild: This must be the Recent files sub-sub-menu, a tk widget. (I have not looked at Menu widgets at all.) The file saved gets added or moved to the top. It is odd that failure happen during deletion. > File "C:\Python34\lib\tkinter\__init__.py", line 2739, in delete > if 'command' in self.entryconfig(i): Looking for a command associated with the menu entry; will delete if there is. Indeed, there should be, as each menu entry has a callback to open the file in an edit window. This is set in update_recent_files_list as part of rebuilding. > File "C:\Python34\lib\tkinter\__init__.py", line 2749, in entryconfigure Another Menu method. > return self._configure(('entryconfigure', index), cnf, kw) > File "C:\Python34\lib\tkinter\__init__.py", line 1247, in _configure > self.tk.call(_flatten((self._w, cmd)))): > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 14: > invalid start byte This does not say what string it found an error in. 'entryconfigure' has 14 chars, so it does not have a position 14. Does your recent file list (in .idlerc) have any names with non-ascii chars? >>> b'\xc0'.decode('latin-1') '?' Perhaps Vidle encodes to something other than utf-8. -- Terry Jan Reedy From Bruce_Sherwood at ncsu.edu Thu Sep 12 05:18:29 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Wed, 11 Sep 2013 21:18:29 -0600 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: Thanks for the advice. I'm going to be away from my computer for a few days but will investigate when I get back. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bruce_Sherwood at ncsu.edu Sat Sep 14 22:14:45 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Sat, 14 Sep 2013 14:14:45 -0600 Subject: [Idle-dev] Guilherme Polo changes lost? Message-ID: Terry Reedy made this comment on part of my recent testing: > There were no detailed options for Run options > introduced by Guilleherme Polo (If file has never been saved, Prompt to > Save or No prompt; If file has been saved before Prompt to Save or no > prompt; On first error Bring shell forward or Do nothing). > I do not know what this is about. I presume you are talking about a proposed patch that has not been applied here. I do not remember seeing it. I looked for an issue but could not find one. ----------------------------- This is very worrisome, as these important features were part of what Guilherme Polo created in his Google Summer of Code project in 2009, and among the important reasons why I still feel it necessary to bundle VIDLE with VPython. I'm copying Guilherme in the hope that he can shed light on this. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bruce_Sherwood at ncsu.edu Sat Sep 14 22:09:51 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Sat, 14 Sep 2013 14:09:51 -0600 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: I removed C:\Users\Bruce\.idlerc and started over. I find that the problem has to do with .idlerc\recent-files.lst. If recent-files.lst contains the following, no problem: C:\Users\Bruce\Desktop\test.py But suppose recent-files.lst contains the following: C:\Users\Bruce\Desktop\test.py H:\HP_Documents\0PythonWork\AirplaneKinematics\accel2.py In that case I get the crash shown below when I try to open test.py or for that matter any file. The crash occurs as soon as I select the file. Because utf-8 is specifically mentioned in the crash, I repeated the test by typing the file name into recent-files.lst using Notepad++ rather than copying it from an old VIDLE recent-files.lst. Still crashes. All of my tests are consistent with the statement that if recent-files.lst contains an existing file name starting with H:\, the crash happens. If instead the file doesn't exist (e.g. H:\glop.py) IDLE works okay and deletes the nonexistent file name from recent-files.lst. C:\Users\Bruce>C:\Python34\python -m idlelib Exception in Tkinter callback Traceback (most recent call last): File "C:\Python34\lib\tkinter\__init__.py", line 1475, in __call__ return self.func(*args) File "C:\Python34\lib\idlelib\IOBinding.py", line 179, in open flist.open(filename, self.loadfile) File "C:\Python34\lib\idlelib\FileList.py", line 34, in open return action(filename) File "C:\Python34\lib\idlelib\IOBinding.py", line 240, in loadfile self.updaterecentfileslist(filename) File "C:\Python34\lib\idlelib\IOBinding.py", line 521, in updaterecentfileslist self.editwin.update_recent_files_list(filename) File "C:\Python34\lib\idlelib\EditorWindow.py", line 915, in update_recent_files_list menu.delete(0, END) # clear, and rebuild: File "C:\Python34\lib\tkinter\__init__.py", line 2739, in delete if 'command' in self.entryconfig(i): File "C:\Python34\lib\tkinter\__init__.py", line 2749, in entryconfigure return self._configure(('entryconfigure', index), cnf, kw) File "C:\Python34\lib\tkinter\__init__.py", line 1247, in _configure self.tk.call(_flatten((self._w, cmd)))): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 14: invalid start byte -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Sun Sep 15 00:14:15 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 14 Sep 2013 18:14:15 -0400 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: On 9/14/2013 4:09 PM, Bruce Sherwood wrote: > I removed C:\Users\Bruce\.idlerc and started over. I find that the > problem has to do with .idlerc\recent-files.lst. > > If recent-files.lst contains the following, no problem: > C:\Users\Bruce\Desktop\test.py > > But suppose recent-files.lst contains the following: > C:\Users\Bruce\Desktop\test.py > H:\HP_Documents\0PythonWork\AirplaneKinematics\accel2.py By my experiments, the problem is the leading 0 in the path component. http://bugs.python.org/issue19020 > > In that case I get the crash shown below when I try to open test.py or > for that matter any file. The crash occurs as soon as I select the file. > > Because utf-8 is specifically mentioned in the crash, I repeated the > test by typing the file name into recent-files.lst using Notepad++ > rather than copying it from an old VIDLE recent-files.lst. Still crashes. > > All of my tests are consistent with the statement that if > recent-files.lst contains an existing file name starting with H:\, the > crash happens. I bet those all continued with \HP_Documents\0Python... > If instead the file doesn't exist (e.g. H:\glop.py) IDLE > works okay and deletes the nonexistent file name from recent-files.lst. > > C:\Users\Bruce>C:\Python34\python -m idlelib > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python34\lib\tkinter\__init__.py", line 1475, in __call__ > return self.func(*args) > File "C:\Python34\lib\idlelib\IOBinding.py", line 179, in open > flist.open(filename, self.loadfile) > File "C:\Python34\lib\idlelib\FileList.py", line 34, in open > return action(filename) > File "C:\Python34\lib\idlelib\IOBinding.py", line 240, in loadfile > self.updaterecentfileslist(filename) > File "C:\Python34\lib\idlelib\IOBinding.py", line 521, in > updaterecentfileslist > self.editwin.update_recent_files_list(filename) > File "C:\Python34\lib\idlelib\EditorWindow.py", line 915, in > update_recent_files_list > menu.delete(0, END) # clear, and rebuild: > File "C:\Python34\lib\tkinter\__init__.py", line 2739, in delete > if 'command' in self.entryconfig(i): > File "C:\Python34\lib\tkinter\__init__.py", line 2749, in entryconfigure > return self._configure(('entryconfigure', index), cnf, kw) > File "C:\Python34\lib\tkinter\__init__.py", line 1247, in _configure > self.tk.call(_flatten((self._w, cmd)))): > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 14: > invalid start byte -- Terry Jan Reedy From tjreedy at udel.edu Sun Sep 15 00:46:57 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 14 Sep 2013 18:46:57 -0400 Subject: [Idle-dev] Guilherme Polo changes lost? In-Reply-To: References: Message-ID: On 9/14/2013 4:14 PM, Bruce Sherwood wrote: > > Terry Reedy made this comment on part of my recent testing: > > > There were no detailed options for Run options > > introduced by Guilleherme Polo (If file has never been saved, Prompt to > Save or No prompt; If file has been saved before Prompt to Save or no > prompt; On first error Bring shell forward or Do nothing). > > > I do not know what this is about. I presume you are talking about a > proposed patch that has not been applied here. I do not remember seeing > it. I looked for an issue but could not find one. > > ----------------------------- > > This is very worrisome, as these important features were part of what > Guilherme Polo created in his Google Summer of Code project in 2009, and > among the important reasons why I still feel it necessary to bundle > VIDLE with VPython. I'm copying Guilherme in the hope that he can shed > light on this. 'gpolo' has opened 55 issues; 4 marked for Idle. Possibly more are for Idle but not so marked. Feel free to check and inform me (put me on the nosy list if not already and say 'This is an Idle issue' on the issue). Most of the rest are, I believe, for tkinter. Of the Idle issues, 3 are closed. The 1 open issue appears to be one of the things you mention above. http://bugs.python.org/issue6699 IDLE: Warn user about overwriting a file that has a newer version. If Roger thinks it OK, he can apply it, or I will look at it eventually. -- Terry Jan Reedy From Bruce_Sherwood at ncsu.edu Sun Sep 15 01:59:22 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Sat, 14 Sep 2013 17:59:22 -0600 Subject: [Idle-dev] Python 3.4.0 alpha 2 available In-Reply-To: References: Message-ID: Yeah, probably so. I guessed the problem was H:\ but you showed that it was actually nothing (0). Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bruce_Sherwood at ncsu.edu Sun Sep 15 18:06:32 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Sun, 15 Sep 2013 10:06:32 -0600 Subject: [Idle-dev] Guilherme Polo changes lost? In-Reply-To: References: Message-ID: In a conversation with Terry Reedy, it became evident that I need to explain the issue of lost capabilities less cryptically. There are several different issues. (1) Ruth Chabay and I have had the opportunity to watch very large numbers of students using VPython in our intro physics curriculum. These engineering and science students come to our course with no previous experience with programming. With IDLE it was common for them to be quite confused and puzzled when their program stopped, simply because their (overly?) large edit window covered up the shell window where the error was displayed. Polo implemented a change that brings the shell window forward when there is an error message, in front of other windows. This is important. (2) Entering statements interactively in the shell encourages experimentation. The same experimentation should be available for running whole programs, but in IDLE this is awkward because of the requirement to save the file somewhere before running. Polo implemented changes that let you configure IDLE so that you can start the editor, type a short program, and press F5 to run it without the interruption of having to decide where to save the file. If you have not experienced this, you might object that it's no big deal to have to save the file first, but in fact it is a surprisingly big deal because it breaks the flow of your thought. Think about the annoyance there would be if in the shell after entering a statement you were told that you had to save the file somewhere. In Polo's implementation, there are three "Run (F5) Preferences" that replace the "Autosave Preferences" in IDLE: If file has never been saved: Prompt to Save or No prompt If file has been saved before: Prompt to Save or No prompt (this is equivalent to current IDLE) On first error: Bring shell forward or Do nothing If you choose both No prompt options and experiment with a new (temporary) file, upon exit you are warned that the file has never been saved and offered the option to save at that point if you wish. One can argue over what the default settings should be, though presumably one default is noncontroversial, namely that an error should bring the shell forward. Bruce On Sat, Sep 14, 2013 at 2:14 PM, Bruce Sherwood wrote: > > Terry Reedy made this comment on part of my recent testing: > > > There were no detailed options for Run options > >> introduced by Guilleherme Polo (If file has never been saved, Prompt to >> Save or No prompt; If file has been saved before Prompt to Save or no >> prompt; On first error Bring shell forward or Do nothing). >> > > I do not know what this is about. I presume you are talking about a > proposed patch that has not been applied here. I do not remember seeing it. > I looked for an issue but could not find one. > > ----------------------------- > > This is very worrisome, as these important features were part of what > Guilherme Polo created in his Google Summer of Code project in 2009, and > among the important reasons why I still feel it necessary to bundle VIDLE > with VPython. I'm copying Guilherme in the hope that he can shed light on > this. > > Bruce > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Mon Sep 16 03:29:45 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Sun, 15 Sep 2013 21:29:45 -0400 Subject: [Idle-dev] Guilherme Polo changes lost? In-Reply-To: References: Message-ID: On 9/15/2013 12:06 PM, Bruce Sherwood wrote: > In a conversation with Terry Reedy, it became evident that I need to > explain the issue of lost capabilities less cryptically. There are > several different issues. > > (1) Ruth Chabay and I have had the opportunity to watch very large > numbers of students using VPython in our intro physics curriculum. These > engineering and science students come to our course with no previous > experience with programming. With IDLE it was common for them to be > quite confused and puzzled when their program stopped, simply because > their (overly?) large edit window covered up the shell window where the > error was displayed. Polo implemented a change that brings the shell > window forward when there is an error message, in front of other > windows. This is important. The reason I did not understand what you were asking for is that this was *not* lost. Rather, on my machine, the Shell Window is brought to the top immediately when a file is run, to present print output, error messages, and to receive input either for input() or >>> commands. If you tested this and experienced different, please give detail as I would consider it a bug. > (2) Entering statements interactively in the shell encourages > experimentation. The same experimentation should be available for > running whole programs, but in IDLE this is awkward because of the > requirement to save the file somewhere before running. With autosave, I experience no awkwardness at all. I have a file 'tem.py' in a miscellaneaous files directory that I use for experimentation. I open it from Recent Files, check to see if I want to save or select all and delete, and proceed with edit-run-edit-run... . An instructor could set up a system with one or more scratch files like this. I can imagine writing a little script to create one or more empty files and add them to the saved files list. > Polo implemented > changes that let you configure IDLE so that you can start the editor, with New File, at least the first time. > type a short program, and press F5 to run it without the interruption of > having to decide where to save the file. I do not know what he did but the easiest way to do this would be to save 'Untitled' somewhere. After Idle is closed and reopened, one would have to either re-open Untitled from Recent Files or click OK on the "File exists! Overwrite?" box. I would rather do the former, which means learning to use Recent Files anyway. People who do not know how to use Save As and Recent Files should learn, as both are common to current Windows app that create files. > If you have not experienced > this, you might object that it's no big deal to have to save the file > first, but in fact it is a surprisingly big deal because it breaks the > flow of your thought. I agree, which is why I think Autosave should be the default, or if not, there should be a setup dialog for the first Idle installation. > In Polo's implementation, there are three "Run (F5) Preferences" that > replace the "Autosave Preferences" in IDLE: > > If file has never been saved: Prompt to Save or No prompt > If file has been saved before: Prompt to Save or No prompt (this is > equivalent to current IDLE) This is too much complication for little if any gain. > On first error: Bring shell forward or Do nothing This would be a regression from current behavior. > If you choose both No prompt options and experiment with a new > (temporary) file, upon exit you are warned that the file has never been > saved and offered the option to save at that point if you wish. > > One can argue over what the default settings should be, though > presumably one default is noncontroversial, namely that an error should > bring the shell forward. Perhaps I should mention that I have experienced enough data loss due to crashes and freeze-ups that I considered having the programs written to disk before running them a *feature*. If anything, I would like to make saving more versions easier, and have a timed backups, or backups with each no-error run. -- Terry Jan Reedy From Bruce_Sherwood at ncsu.edu Mon Sep 16 07:10:02 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Sun, 15 Sep 2013 23:10:02 -0600 Subject: [Idle-dev] Guilherme Polo changes lost? In-Reply-To: References: Message-ID: Thanks for clearing up my misunderstanding about the shell window coming forward. Some years ago that wasn't the case and was one of the reasons for VIDLE. We agree that "No prompt" should be the default for Autosave Preferences/At Start of Run once a file exists, but we disagree on the value of being able to test a few lines of code without there having to be a file. Yes, one can of course create a test.py file somewhere for such uses, and get to it through Recent Files. But I don't like being a second-class citizen in this regard. Those who prefer to do their testing in the shell window are not required to create and/or open a file for the purpose, and if I choose to run complete routines from the edit window I shouldn't have to do this either. I want to be able to use the editor the way others use the shell, with the same immediacy. Hence my strong desire for the option "If file has never been saved, No prompt". On the other hand, we judged it prudent to specify for occasional users (our intro physics students) "If file has never been saved, Prompt to Save", to make sure that they've saved the file to a permanent place even if there is a crash during the session. Hence the extra options implemented by Polo. We want and need the flexibility to tailor the environment. At the end of Polo's 2009 project, I thought there was agreement that his changes were acceptable. I agree that in addition to the autosave that occurs on a run, it would be good to implement timed backups and/or other mechanisms for guarding against crashes. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Mon Sep 16 22:02:45 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Mon, 16 Sep 2013 16:02:45 -0400 Subject: [Idle-dev] Guilherme Polo changes lost? In-Reply-To: References: Message-ID: On 9/16/2013 1:10 AM, Bruce Sherwood wrote: > Thanks for clearing up my misunderstanding about the shell window coming > forward. Some years ago that wasn't the case and was one of the reasons > for VIDLE. Discussions of the future should start with the present (the most recent public release, if not the repository. > We agree that "No prompt" should be the default for Autosave > Preferences/At Start of Run once a file exists, but we disagree on the > value of being able to test a few lines of code without there having to > be a file. Without seeing Polo's patch, I do not know that it eliminated the need for there to be a file. > Yes, one can of course create a test.py file somewhere for > such uses, and get to it through Recent Files. But I don't like being a > second-class citizen in this regard. The rhetoric of discrimination has a negative effect on me. You would be more persuasive without it. > my strong desire for the option "If file has never been saved, No prompt". Again, I cannot evaluate Polo's patch without seeing it. Perhaps we should make the current option ternary. "When running code from an editor window, prompt to save [] any unsaved [] 'Untitled' only [] never" 'Untitled only' appears to be what the current 'no prompt' actually means. 'Never' would be the new option, as it would actually mean 'never'. (I would use this for short throwaway code ;-). Untitled files would be saved somewhere (to be decided). The saved file could be listed in Recent files so it can be retrieved in the next session. (After a crash or freeze, for instance.) 'New window' would still bring up a blank window. Running a new window would over-write any saved Untitled window. -- Terry Jan Reedy From Bruce_Sherwood at ncsu.edu Mon Sep 16 22:52:18 2013 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Mon, 16 Sep 2013 14:52:18 -0600 Subject: [Idle-dev] Guilherme Polo changes lost? In-Reply-To: References: Message-ID: Thanks! Your ternary proposal sounds great, and better than what is currently in VIDLE. I don't understand how/why Polo's work in this area has vanished, but maybe it doesn't matter. Bruce On Mon, Sep 16, 2013 at 2:02 PM, Terry Reedy wrote: > On 9/16/2013 1:10 AM, Bruce Sherwood wrote: > > Perhaps we should make the current option ternary. > "When running code from an editor window, prompt to save > [] any unsaved [] 'Untitled' only [] never" > > 'Untitled only' appears to be what the current 'no prompt' actually means. > 'Never' would be the new option, as it would actually mean 'never'. (I > would use this for short throwaway code ;-). Untitled files would be saved > somewhere (to be decided). The saved file could be listed in Recent files > so it can be retrieved in the next session. (After a crash or freeze, for > instance.) 'New window' would still bring up a blank window. Running a new > window would over-write any saved Untitled window. > > > -- > Terry Jan Reedy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Tue Sep 17 19:27:21 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Tue, 17 Sep 2013 13:27:21 -0400 Subject: [Idle-dev] Autosaving 'Untitled' on Run In-Reply-To: References: Message-ID: On 9/16/2013 4:52 PM, Bruce Sherwood wrote: > On Mon, Sep 16, 2013 at 2:02 PM, Terry Reedy Perhaps we should make the current option ternary. > "When running code from an editor window, prompt to save > [] any unsaved [] 'Untitled' only [] never" > > 'Untitled only' appears to be what the current 'no prompt' actually > means. 'Never' would be the new option, as it would actually mean > 'never'. (I would use this for short throwaway code ;-). Untitled > files would be saved somewhere (to be decided). The saved file could > be listed in Recent files so it can be retrieved in the next > session. (After a crash or freeze, for instance.) 'New window' would > still bring up a blank window. Running a new window would over-write > any saved Untitled window. > Thanks! Your ternary proposal sounds great, and better than what is > currently in VIDLE. http://bugs.python.org/issue19042 The last important piece of the 'puzzle' was to decide on the location of the scratch file. I initially thought of idlelib/, but that did not seem right. It might not even be writeable. (I believe Lib/* can be a zip file, for instance.) The user .idlerc/ directory should work fine. -- Terry Jan Reedy From letterrip at gmail.com Fri Sep 27 02:07:54 2013 From: letterrip at gmail.com (Tom M) Date: Thu, 26 Sep 2013 16:07:54 -0800 Subject: [Idle-dev] more interesting ideas for idle Message-ID: I've been using the MatLAB IDE lately, and it has a few things that would be worth looking at for IDLE 1) a button next to the prompt that can be used for browsing and searching for functions this is really useful if you either aren't sure what module you need for a specific function, or just want to get a feel for the various functions available from assorted modules http://www.mathworks.com/help/matlab/matlab_env/find-functions-using-the-function-browser.html 2) a window showing currently available variables and their values it shows all variables that are currently in scope, the number of elements the variable contains, etc. http://www.mathworks.com/help/matlab/ref/workspace.html Also a command to display all variables in scope (whos) Tom M. From tjreedy at udel.edu Fri Sep 27 10:11:01 2013 From: tjreedy at udel.edu (Terry Reedy) Date: Fri, 27 Sep 2013 04:11:01 -0400 Subject: [Idle-dev] more interesting ideas for idle In-Reply-To: References: Message-ID: On 9/26/2013 8:07 PM, Tom M wrote: > I've been using the MatLAB IDE lately, and it has a few things that > would be worth looking at for IDLE > > 1) a button next to the prompt that can be used for browsing and > searching for functions > this is really useful if you either aren't sure what module you need > for a specific function, or just want to get a feel for the various > functions available from assorted modules This strikes me as duplicating the manuals. Many people keep them available is a separate window. > http://www.mathworks.com/help/matlab/matlab_env/find-functions-using-the-function-browser.html > > 2) a window showing currently available variables and their values > it shows all variables that are currently in scope, the number of > elements the variable contains, etc. The debugger window has this, but it only works with files run from the editor. It is modal (the only way forward is the buttons in the window). It might be possible to reuse code to have an option for a separate non-modal read-only popup for global names. > http://www.mathworks.com/help/matlab/ref/workspace.html -- Terry Jan Reedy From rovitotv at gmail.com Mon Sep 30 02:41:23 2013 From: rovitotv at gmail.com (Todd V. Rovito) Date: Sun, 29 Sep 2013 20:41:23 -0400 Subject: [Idle-dev] Completed: Google Summer of Code 2013 IDLE Unit Testing and Improvements Message-ID: In April 2013 we challenged students to not spend their summer idle around the swimming pool but rather spend their time on IDLE and make a difference. IDLE is Python?s Integrated Development Environment (IDE) that is shipped with each Python release (http://en.wikipedia.org/wiki/IDLE_(Python)). Since IDLE ships with Python it is often the first IDE a new Python programmer uses. The Python development community wants to make IDLE an awesome experience especially for people that are learning Python. Despite the fact that IDLE originally shipped in 1998 it had no unit test cases, making it difficult to confidently update the code and ship new versions. For this Google Summer of Code project our students Jayakrishnan Rajagopalasarma (http://123works.blogspot.com/search/label/GSoC%202013) and Phil Webster (http://weblog.philwebster.net/tag/gsoc/) had to not only create the unit tests but assist with design of the unit test framework (http://bugs.python.org/issue15392). By the end of the summer of 2013 Phil and Jayakrishnan have worked on five patches that have been committed to the CPython open source project. In addition the team has started work on an additional five issues (at bugs.python.org) but have not completed them yet. Jayakrishnan explored an idea to add automatic PEP8 checking to IDLE http://bugs.python.org/issue18704. Our hope is that both JayKrish and Phil continue to contribute to Python even now that GSoC is complete. The team wishes to thank Google and the Python Software Foundation for this opportunity to contribute to Python. Thanks to all the Python Core Developers that helped review and commit issues for the students. Special thanks goes to Terry Reedy who provided outstanding feedback on issues and performed all of the student?s commits. Finally thanks to Terri Oda for being a great GSoC administrator for the Python Software Foundation and helping by assigning an awesome co-mentor J.H. Hawley. The complete list of closed issues is below: http://bugs.python.org/issue18279 http://bugs.python.org/issue18189 http://bugs.python.org/issue18425 http://bugs.python.org/issue18226 http://bugs.python.org/issue18489 The complete list of started issues is below: http://bugs.python.org/issue18292 http://bugs.python.org/issue18910 http://bugs.python.org/issue18409 http://bugs.python.org/issue18410 http://bugs.python.org/issue18592 -------------- next part -------------- An HTML attachment was scrubbed... URL: From memilanuk at gmail.com Mon Sep 30 14:03:45 2013 From: memilanuk at gmail.com (memilanuk) Date: Mon, 30 Sep 2013 05:03:45 -0700 Subject: [Idle-dev] Completed: Google Summer of Code 2013 IDLE Unit Testing and Improvements In-Reply-To: References: Message-ID: That's awesome... I hope they both learned a lot and will continue helping to improve IDLE! I especially applaud effort/idea with the auto pep8 checking ;)