From gervich at sbcglobal.net Fri Jun 12 05:31:31 2009 From: gervich at sbcglobal.net (Jason Gervich) Date: Thu, 11 Jun 2009 20:31:31 -0700 Subject: [Idle-dev] Restart Shell, No Longer Being Offered? In-Reply-To: <2238dbfb0903161657j20d835a9u64b5e7bd7dee4730@mail.gmail.com> Message-ID: <1244777491.5002.188.camel@jason-desktop> To get the Shell menu in Ubuntu, open a terminal and at the command line prompt type "idle". The IDLE shell will appear with the Shell menu in the menu bar. Click Shell-->Restart Shell. This only works if no other instances of the Python Shell are running. If you want to run more that one instance on the same machine or network, start IDLE as "idle -n". You can run multiple versions but you won't have the Shell/Restart menu. This from the Python team: Running IDLE from the Applications menu under Ubuntu will not have the Shell menu. If you bring up a terminal and enter "idle", you will have the Shell menu. IDLE, when selected from the Application menu, is being run with the "-n" command line by default in Ubuntu. You can remove this option by editing the menu item for IDLE. ---------- nosy: +serwy Hope this helps, Jason Gervich -------------- next part -------------- An HTML attachment was scrubbed... URL: From taleinat at gmail.com Tue Jun 16 00:36:31 2009 From: taleinat at gmail.com (Tal Einat) Date: Tue, 16 Jun 2009 01:36:31 +0300 Subject: [Idle-dev] Restart Shell, No Longer Being Offered? In-Reply-To: <1244777491.5002.188.camel@jason-desktop> References: <2238dbfb0903161657j20d835a9u64b5e7bd7dee4730@mail.gmail.com> <1244777491.5002.188.camel@jason-desktop> Message-ID: <7afdee2f0906151536m6ed4e86fm24cba61009682d19@mail.gmail.com> Since it wasn't entirely clear exactly what you're looking for in your original post, I would also like to mention... Roger Serwy has recently written an IDLE extension to clear the shell window's contents (without affecting the state of the underlying Python process). This is different from restarting the shell, which is what Jason was referring to, which actually starts a new Python process in which following commands will be run (but without clearing the shell window). See: http://bugs.python.org/issue6143 - Tal Einat On Fri, Jun 12, 2009 at 6:31 AM, Jason Gervich wrote: > To get the Shell menu in Ubuntu, open a terminal and at the command line > prompt type "idle". The IDLE shell will appear with the Shell menu in the > menu bar. Click Shell-->Restart Shell. This only works if no other instances > of the Python Shell are running. If you want to run more that one instance > on the same machine or network, start IDLE as "idle -n". You can run > multiple versions but you won't have the Shell/Restart menu. > > This from the Python team: > > Running IDLE from the Applications menu under Ubuntu will not have the > Shell menu. If you bring up a terminal and enter "idle", you will have > the Shell menu. > > IDLE, when selected from the Application menu, is being run with the > "-n" command line by default in Ubuntu. You can remove this option by > editing the menu item for IDLE. > > ---------- > nosy: +serwy > > Hope this helps, > > Jason Gervich > > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gervich at sbcglobal.net Thu Jun 18 21:00:32 2009 From: gervich at sbcglobal.net (Jason Gervich) Date: Thu, 18 Jun 2009 12:00:32 -0700 Subject: [Idle-dev] IDLE comments Message-ID: <1245351632.3326.6.camel@jason-desktop> Why does IDLE use two hash marks for comments (##)? Most other editors (Geany, SPE) use a single hash mark (#) to designate comments. How does one change IDLE to use just a single (#) hash mark for comments? Thanks, Jason Gervich Santa Cruz, CA -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandeep.techie at gmail.com Fri Jun 19 00:19:29 2009 From: sandeep.techie at gmail.com (Sandeep Krishna) Date: Thu, 18 Jun 2009 15:19:29 -0700 Subject: [Idle-dev] Python3.0.1 - Pythonw.exe [IDLE] Message-ID: <971666850906181519p6c22cdf3qde1b925593168acd@mail.gmail.com> Hi there, I have downloaded Python3.0.1 for windows. While using the PythonW.exe i encountered a bug: round(_,2)_ method, which doesnt provide a round off result. But the same works fine for python.exe interpreter.[r301:6951] Thanks, Sandeep From taleinat at gmail.com Sat Jun 20 11:33:50 2009 From: taleinat at gmail.com (Tal Einat) Date: Sat, 20 Jun 2009 12:33:50 +0300 Subject: [Idle-dev] IDLE comments In-Reply-To: <1245351632.3326.6.camel@jason-desktop> References: <1245351632.3326.6.camel@jason-desktop> Message-ID: <7afdee2f0906200233p719575cfod9f3923ab7a2fe62@mail.gmail.com> Jason Gervich wrote: > Why does IDLE use two hash marks for comments (##)? Most other editors > (Geany, SPE) use a single hash mark (#) to designate comments. I actually don't know. I find that it's rather useful since I usually use the commenting function to comment out blocks of code, and having these commented with "##" differentiates them from comments which I write manually. > How does one change IDLE to use just a single (#) hash mark for comments? Take a look at EditorWindow.comment_region_event in idlelib/EditorWindow.py. The "##" is hard-coded; just changing it to "#" should work (not tested). - Tal Einat From fuzzyman at voidspace.org.uk Sat Jun 20 16:35:00 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 20 Jun 2009 15:35:00 +0100 Subject: [Idle-dev] IDLE comments In-Reply-To: <7afdee2f0906200233p719575cfod9f3923ab7a2fe62@mail.gmail.com> References: <1245351632.3326.6.camel@jason-desktop> <7afdee2f0906200233p719575cfod9f3923ab7a2fe62@mail.gmail.com> Message-ID: <4A3CF394.7010105@voidspace.org.uk> Tal Einat wrote: > Jason Gervich wrote: > >> Why does IDLE use two hash marks for comments (##)? Most other editors >> (Geany, SPE) use a single hash mark (#) to designate comments. >> > > I actually don't know. I find that it's rather useful since I usually > use the commenting function to comment out blocks of code, and having > these commented with "##" differentiates them from comments which I > write manually. > +1 this is exactly how I use it. Michael > >> How does one change IDLE to use just a single (#) hash mark for comments? >> > > Take a look at EditorWindow.comment_region_event in > idlelib/EditorWindow.py. The "##" is hard-coded; just changing it to > "#" should work (not tested). > > - Tal Einat > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From guido at python.org Sat Jun 20 17:17:37 2009 From: guido at python.org (Guido van Rossum) Date: Sat, 20 Jun 2009 08:17:37 -0700 Subject: [Idle-dev] IDLE comments In-Reply-To: <4A3CF394.7010105@voidspace.org.uk> References: <1245351632.3326.6.camel@jason-desktop> <7afdee2f0906200233p719575cfod9f3923ab7a2fe62@mail.gmail.com> <4A3CF394.7010105@voidspace.org.uk> Message-ID: On Sat, Jun 20, 2009 at 7:35 AM, Michael Foord wrote: > Tal Einat wrote: >> >> Jason Gervich wrote: >> >>> >>> Why does IDLE use two hash marks for comments (##)? Most other editors >>> (Geany, SPE) use a single hash mark (#) to designate comments. >>> >> >> I actually don't know. I find that it's rather useful since I usually >> use the commenting function to comment out blocks of code, and having >> these commented with "##" differentiates them from comments which I >> write manually. >> > > +1 this is exactly how I use it. And this is how it's meant to be used. Quickly comment or uncomment a section of code. Invaluable. PS. Emacs does this too. I think there it was invented by Tim Peters. It is done so that the auto-indent functionality *ignores* the indentation of comments starting with ##, but assumes that comments starting with #+space are meant to align up properly with the surrounding code. (I don't know if IDLE uses this rule too.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) From taleinat at gmail.com Wed Jun 24 12:15:57 2009 From: taleinat at gmail.com (Tal Einat) Date: Wed, 24 Jun 2009 13:15:57 +0300 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> Message-ID: <7afdee2f0906240315oa38dd1ardab2dde66674610e@mail.gmail.com> I've finally found the time to fix up SearchBar - the powerful replacement for IDLE's feeble search capabilities. It supports all of the original search engine's features, a less intrusive interface, incremental searching (search-as-you-type), highlighting of all matches in the text and word completion in the find/replace entries. I hope this is now almost ready for including in IDLE out-of-the-box. I've fixed all outstanding issues, cleaned up and optimized the code, and added comments and documentation where needed. This version should work with any 2.x version of Python from 2.3 onwards. I have tested with versions 2.3 through 2.6 on WindowsXP. I'd appreciate anyone who can give it a try and see how it works out, especially non-Windows users. *Installation:* (see the included README file) Unpack the attached archive, or download from http://pypi.python.org/pypi/SearchBar/ Place the .py files in your Lib/idlelib directory, and add the following to the text file Lib\idlelib\config-extensions.def: [SearchBar] enable=1 is_incremental=1 [Searchbar_bindings] toggle-search-bar= Usage: Just search as usual. (When the extension is enabled it binds to the usual find/replace events.) - Enter, Control+f and Control+g all search for the next appearance - The Escape key closes the search bar, and so will clicking outside of it - Alt+/ completes words in the find and replace entries, press multiple times to cycle through possible completions - When replacing: Enter replaces and jumps to the next appearance, Shift+Enter jumps to the next appearance without replacing - Incremental searching can be toggled via the extension configuration On Mon, Jan 29, 2007 at 2:40 AM, Tal Einat wrote: > Attached is a first working version of the SearchBar extension, with incremental > search and word completion. > > What I need now is beta testers! Please take the 2 minutes it takes to > install this, and report and issues or comments. > (You can always disable the extension in config-extensions.def (enable=0), > and the good old dialogs will kick in.) > > * AFAIK this -should- work with all recent versions of IDLE (those shipped > with Python2.2 and above). > > Enjoy! > Comments et. al. much appreciated. > > - Tal > > > Usage: > Just search as usual. When the extension is enabled it binds to the usual > find/replace events. > To complete words in the find and replace entries: Alt+/ ("slash", on the > question mark key) > > Installation: > Place the attached files in your idlelib dir, > and add the following lines to config-extensions.def: > " > [SearchBar] > enable=1 > is_incremental=1 > [Searchbar_bindings] > toggle-search-bar= > " > > (yes, the last 2 lines are required) > > > On 12/8/06, Tal Einat wrote: >> >> >> >> On 12/7/06, Michael Foord < fuzzyman at voidspace.org.uk> wrote: >>> >>> Kurt B. Kaiser wrote: >>> > My top items: >>> [snip] >>> >> > Incremental search (in a text entry widget in the bottom status bar). >>> > >>> >>> +1 million. :-) >>> >>> Not because I need it, but just because it's the best way. >> >> >> I've been working some on that too. I've created a Search Bar extension >> which can be used instead of the Find & Replace dialogs. The search bar >> shows a thin bar on the bottom of the window, with an entry box and the >> usual options (wrap, direction, case-sensitive...). For replacing, the bar >> is twice as thick, with two entries and extra replacement options (replace, >> find next, replace all). >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SearchBar-0.6.tar.gz Type: application/x-gzip Size: 9381 bytes Desc: not available URL: From sean at ticketweb.com Wed Jun 24 23:23:46 2009 From: sean at ticketweb.com (Sean Wolfe) Date: Wed, 24 Jun 2009 14:23:46 -0700 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <7afdee2f0906240315oa38dd1ardab2dde66674610e@mail.gmail.com> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> <7afdee2f0906240315oa38dd1ardab2dde66674610e@mail.gmail.com> Message-ID: <50CE562EE612A046BF831CD48CF11289012EA311@ELSCA-EXB-AV1.ticketmaster.corp> Hey Tal and co thanks for the work on IDLE... I'm continuing to use and enjoy the ide.... loving the lightweight approach and simplicity. I'm using the pygame module for fun gaming stuff and the 'selenium' web test suite for my jobby job... and having a blast! thanks again and be well :o) Sean - San Francisco ________________________________ From: idle-dev-bounces+sean=ticketweb.com at python.org [mailto:idle-dev-bounces+sean=ticketweb.com at python.org] On Behalf Of Tal Einat Sent: Wednesday, June 24, 2009 3:16 AM To: idle-dev at python.org Cc: Michael Haubenwallner; Kurt B. Kaiser Subject: Re: [Idle-dev] SearchBar - Have fun searching in IDLE! I've finally found the time to fix up SearchBar - the powerful replacement for IDLE's feeble search capabilities. It supports all of the original search engine's features, a less intrusive interface, incremental searching (search-as-you-type), highlighting of all matches in the text and word completion in the find/replace entries. I hope this is now almost ready for including in IDLE out-of-the-box. I've fixed all outstanding issues, cleaned up and optimized the code, and added comments and documentation where needed. This version should work with any 2.x version of Python from 2.3 onwards. I have tested with versions 2.3 through 2.6 on WindowsXP. I'd appreciate anyone who can give it a try and see how it works out, especially non-Windows users. Installation: (see the included README file) Unpack the attached archive, or download from http://pypi.python.org/pypi/SearchBar/ Place the .py files in your Lib/idlelib directory, and add the following to the text file Lib\idlelib\config-extensions.def: [SearchBar] enable=1 is_incremental=1 [Searchbar_bindings] toggle-search-bar= Usage: Just search as usual. (When the extension is enabled it binds to the usual find/replace events.) * Enter, Control+f and Control+g all search for the next appearance * The Escape key closes the search bar, and so will clicking outside of it * Alt+/ completes words in the find and replace entries, press multiple times to cycle through possible completions * When replacing: Enter replaces and jumps to the next appearance, Shift+Enter jumps to the next appearance without replacing * Incremental searching can be toggled via the extension configuration On Mon, Jan 29, 2007 at 2:40 AM, Tal Einat wrote: Attached is a first working version of the SearchBar extension, with incremental search and word completion. What I need now is beta testers! Please take the 2 minutes it takes to install this, and report and issues or comments. (You can always disable the extension in config-extensions.def (enable=0), and the good old dialogs will kick in.) * AFAIK this -should- work with all recent versions of IDLE (those shipped with Python2.2 and above). Enjoy! Comments et. al. much appreciated. - Tal Usage: Just search as usual. When the extension is enabled it binds to the usual find/replace events. To complete words in the find and replace entries: Alt+/ ("slash", on the question mark key) Installation: Place the attached files in your idlelib dir, and add the following lines to config-extensions.def: " [SearchBar] enable=1 is_incremental=1 [Searchbar_bindings] toggle-search-bar= " (yes, the last 2 lines are required) On 12/8/06, Tal Einat wrote: On 12/7/06, Michael Foord < fuzzyman at voidspace.org.uk > wrote: Kurt B. Kaiser wrote: > My top items: [snip] > Incremental search (in a text entry widget in the bottom status bar). > +1 million. :-) Not because I need it, but just because it's the best way. I've been working some on that too. I've created a Search Bar extension which can be used instead of the Find & Replace dialogs. The search bar shows a thin bar on the bottom of the window, with an entry box and the usual options (wrap, direction, case-sensitive...). For replacing, the bar is twice as thick, with two entries and extra replacement options (replace, find next, replace all). CONFIDENTIALITY NOTICE: This message contains information which may be confidential or privileged. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this transmission in error, please notify me immediately by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: From clockworksaint at gmail.com Thu Jun 25 15:18:55 2009 From: clockworksaint at gmail.com (Weeble) Date: Thu, 25 Jun 2009 14:18:55 +0100 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <7afdee2f0906240315oa38dd1ardab2dde66674610e@mail.gmail.com> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> <7afdee2f0906240315oa38dd1ardab2dde66674610e@mail.gmail.com> Message-ID: <13e3f9930906250618q23fb638xedf4262870a03c0c@mail.gmail.com> On Wed, Jun 24, 2009 at 11:15 AM, Tal Einat wrote: > This version should work with any 2.x version of Python from 2.3 onwards. I have tested with versions 2.3 through 2.6 on WindowsXP. I'd appreciate anyone who can give it a try and see how it works out, especially non-Windows users. Something's not working for me. I get lots of exceptions like this every time I type anything into the find box: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__ return self.func(*args) File "c:\python26\lib\idlelib\SearchBar.py", line 204, in _search_expression_changed_callback elif self._set_search_expression(): File "c:\python26\lib\idlelib\SearchBar.py", line 523, in _set_search_expression self.window_engine.set_search_expression(search_exp) File "c:\python26\lib\idlelib\WindowSearchEngine.py", line 265, in set_search_expression string, case_sensitive) File "c:\python26\lib\idlelib\WindowSearchEngine.py", line 28, in __init__ self._mark_hits() File "c:\python26\lib\idlelib\WindowSearchEngine.py", line 52, in _mark_hits tag_add("findmark", start_idx, start_idx + add_string_len_str) TypeError: unsupported operand type(s) for +: '_tkinter.Tcl_Obj' and 'str' According to the About box, I'm on Python 2.6 and Tk 8.5. From taleinat at gmail.com Thu Jun 25 15:53:04 2009 From: taleinat at gmail.com (Tal Einat) Date: Thu, 25 Jun 2009 16:53:04 +0300 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <13e3f9930906250618q23fb638xedf4262870a03c0c@mail.gmail.com> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> <7afdee2f0906240315oa38dd1ardab2dde66674610e@mail.gmail.com> <13e3f9930906250618q23fb638xedf4262870a03c0c@mail.gmail.com> Message-ID: <7afdee2f0906250653s63f82244g55498fc84719e4b1@mail.gmail.com> On Thu, Jun 25, 2009 at 4:18 PM, Weeble wrote: > On Wed, Jun 24, 2009 at 11:15 AM, Tal Einat wrote: >> This version should work with any 2.x version of Python from 2.3 onwards. I have tested with versions 2.3 through 2.6 on WindowsXP. I'd appreciate anyone who can give it a try and see how it works out, especially non-Windows users. > > Something's not working for me. I get lots of exceptions like this > every time I type anything into the find box: > > Exception in Tkinter callback > Traceback (most recent call last): > ?File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__ > ? ?return self.func(*args) > ?File "c:\python26\lib\idlelib\SearchBar.py", line 204, in > _search_expression_changed_callback > ? ?elif self._set_search_expression(): > ?File "c:\python26\lib\idlelib\SearchBar.py", line 523, in > _set_search_expression > ? ?self.window_engine.set_search_expression(search_exp) > ?File "c:\python26\lib\idlelib\WindowSearchEngine.py", line 265, in > set_search_expression > ? ?string, case_sensitive) > ?File "c:\python26\lib\idlelib\WindowSearchEngine.py", line 28, in __init__ > ? ?self._mark_hits() > ?File "c:\python26\lib\idlelib\WindowSearchEngine.py", line 52, in _mark_hits > ? ?tag_add("findmark", start_idx, start_idx + add_string_len_str) > TypeError: unsupported operand type(s) for +: '_tkinter.Tcl_Obj' and 'str' > > According to the About box, I'm on Python 2.6 and Tk 8.5. > Hi Weeble, Thanks for taking the time to test this! I only tested with Python2.6.2. Apparently at some point Tkinter was patched to fix just this problem (issue 5193), so it seems Python2.6 doesn't include this patch while 2.6.2 does. Workaround implemented. Updated files attached. - Tal -------------- next part -------------- A non-text attachment was scrubbed... Name: SearchBar-0.6.1.tar.gz Type: application/x-gzip Size: 9098 bytes Desc: not available URL: From alan.gauld at btinternet.com Mon Jun 29 23:19:15 2009 From: alan.gauld at btinternet.com (Alan Gauld) Date: Mon, 29 Jun 2009 22:19:15 +0100 Subject: [Idle-dev] IDLE 3000_a2 (fixed non-fatal error in script) References: Message-ID: "Mr. T" wrote > at IDLE and think, hmm great IDE but it could really use a spit shining. > So > here is a very simple script showing my ideas to improve IDLE. I don;t see any other responses to this and only just picked it up myself, but I'd say yes! It would be very good to separate the prompt and text Or, at the very least, to have a copy n paste like that used in PyCrust which intelligently removes the prompts. But I like this idea better. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ From alan.gauld at btinternet.com Mon Jun 29 23:27:17 2009 From: alan.gauld at btinternet.com (Alan Gauld) Date: Mon, 29 Jun 2009 22:27:17 +0100 Subject: [Idle-dev] Strange behaviouir of IDLE 3 Message-ID: I've been updating my online tutorial to Python v3. I've come across a weird "feature" of IDLE 3: The menus show as a pair of up/down arrows! Clicking the arrows does nothing obvious. If you select a menu and then hit the letter of the menu item it works OK but you can't see it on screen so can't use the mouse. This is a real pain! Has anyone else found this? Or is it just me? And does anyone know what to do to fix it ? I'm using Windows XP Pro SP2 and Python 3.0 >>> import sys >>> sys.version '3.0 (r30:67503, Dec 11 2008, 09:05:16) [MSC v.1500 32 bit (Intel)]' >>> IDLE for 2.5.1 works fine on the same machine -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/l2p/