From altern2 at gmail.com Mon Jan 1 21:06:19 2007 From: altern2 at gmail.com (altern) Date: Mon, 01 Jan 2007 21:06:19 +0100 Subject: [Idle-dev] error with IDLE on debian In-Reply-To: <878xgp53ei.fsf@hydra.bayview.thirdcreek.com> References: <459117CE.1030609@gmail.com> <878xgp53ei.fsf@hydra.bayview.thirdcreek.com> Message-ID: <459969BB.2090404@gmail.com> Kurt B. Kaiser wrote: > altern writes: > >> Hi, I wrote with this problem to the general Python mailing list but I >> did not get any answer so I decided to email to the IDLE-dev list. My >> problem is that when i try to run IDLE on my debian laptop I get this error. >> >> $ idle >> Traceback (most recent call last): >> File "/usr/bin/idle", line 5, in ? >> main() >> File "idlelib/PyShell.py", line 1359, in main >> File "idlelib/FileList.py", line 44, in new >> File "idlelib/PyShell.py", line 105, in __init__ >> File "idlelib/EditorWindow.py", line 111, in __init__ >> File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 2764, in __init__ >> Widget.__init__(self, master, 'text', cnf, kw) >> File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1865, in __init__ >> self.tk.call( >> _tkinter.TclError: expected integer but got "`100" >> >> Few weeks ago IDLE worked fine, I dont really know what could be causing >> the error. >> >> I am running Debian unstable with python 2.4.4, tcl8.4, tk8.4, python-tk >> 24.4-1 and IDLE 2.4.4-2. I already tried to reinstall IDLE, tk and tcl >> and python-tk but that did not solve anything, i keep getting the same >> error. >> >> any ideas? > > Try setting aside (i.e. rename) your .idlerc directory and restart IDLE. of course, i should have thought about that myself. it worked. thanks! enrike From sspatz at kcnet.com Mon Jan 15 05:17:43 2007 From: sspatz at kcnet.com (Saul Spatz) Date: Sun, 14 Jan 2007 22:17:43 -0600 Subject: [Idle-dev] Newbie Question In-Reply-To: <7afdee2f0612270923l79a4698o614ae9eee16d46a5@mail.gmail.com> References: <45929BD5.6010500@kcnet.com> <7afdee2f0612270923l79a4698o614ae9eee16d46a5@mail.gmail.com> Message-ID: <45AB0067.80506@kcnet.com> Tal Einat wrote: > On 12/27/06, Saul Spatz wrote: >> >> I am rather new to both python and IDLE. The references to IDLE at >> www.python.org seem sadly out-of-date. I have a couple of simple >> enhancements I would like to make to IDLE that are not likely to be of >> general interest. (I want to use IDLE in teaching, and I want to save >> the sessions, both user input and IDLE output. I would like IDLE to >> remember where I saved the last session and default to that directory, >> and I would like it to prompt me if I close the IDLE window without >> having saved the session.) It seems like these should be easy to >> program, but I can't find the IDLE source. >> >> Where is it, please? I assume that I am allowed modify it just for my >> own use. > > > Overcourse you may. > > IDLE is written in Python, so you can simply edit its code, wherever your > Python installation is. > Just look in \Lib\idlelib\. > (For instance, on Windows: C:\Python25\Lib\idlelib\) > > In addition, IDLE's source is in Python's SVN: > http://www.python.org/dev/faq#subversion-svn > (here too, look under Lib\idlelib\.) > > In addition, we'd be glad to hear any about any features you find > missing or > suggestions for improvement regarding IDLE. > > Good luck! > > - Tal > Thanks. I think I've figured out how to modify IDLE to do what I want. Now, I'm having trouble figuring out how best to organize my changes so they don't get clobbered by the next IDLE update. I'm trying to work out how best to deal with packages and python namespaces. Here is a sample of what I have worked out: #idle2.pyw import idlelib.PyShell import time from Tkinter import * EditorWindow = idlelib.EditorWindow.EditorWindow class MyPyShell(idlelib.PyShell.PyShell): def close2(self): format = '%d%b%Y.%H%M%S.log' path = "E:/MyPythonProjects/" filename = path + time.strftime(format) try: log = open(filename,'w') log.write(self.text.get(1.0,END)) log.close() except IOError: pass return EditorWindow.close(self) idlelib.PyShell.PyShell = MyPyShell idlelib.PyShell.main() This seems to work. However, I don't really want the path to be hard-coded into my program. I want to be able to select the directory, and to control the logging behavior interactively. This means that I will have to subclass ConfigDialog.ConfigDialog and perhaps other classes as well. Am I likely to run into trouble with the approach indicated above, and, in any case, is there a better way? I realize that this question has little to do with IDLE development, but I don't know where else to turn for help. I'd be grateful if some guru will give of his wisdom to a beginner. Thanks, Saul From taleinat at gmail.com Mon Jan 15 12:26:24 2007 From: taleinat at gmail.com (Tal Einat) Date: Mon, 15 Jan 2007 13:26:24 +0200 Subject: [Idle-dev] Newbie Question In-Reply-To: <45AB0067.80506@kcnet.com> References: <45929BD5.6010500@kcnet.com> <7afdee2f0612270923l79a4698o614ae9eee16d46a5@mail.gmail.com> <45AB0067.80506@kcnet.com> Message-ID: <7afdee2f0701150326w2eee369dxfa0ae0d02494aaad@mail.gmail.com> You could (and probably should) make this an IDLE extension. This will increase the chance that your changes will work with future changes in IDLE, and allow you to easily implement (and debug!) such changes when they will be required. For instance, you could easily switch your extension on or off in a config file, instead of running a different version of IDLE. For info on writing extensions, read the "extend.txt" file in Lib\idlelib\, and check out the code of existing extensions (FormatParagraph and CodeContext are good examples). For a taste - when writing an extension, you write a class whose contructor recieves the EditorWindow instance as an argument. PyShell is a subclass of EditorWindow, so your extension will actually be recieving the PyShell instance, which you can change you your liking. Also, you should use idleConf to save/load configuration; idleConf has an 'extensions' section specifically for IDLE extensions. So you could write file's default location in config-extensions.def, and each user can choose a location of his choice in his config-extensions.cfg. You can easily configure an extension to be enabled only for Shell windows by writing "enable_editor=0" in config_extensions.def. Caveat: Writing paths in IDLE's config files requires reading/writing them as "raw" values, which idleConf currently doesn't allow. I have a simple patch which allows idleConf to do this, but I sent it along with a patch for the Squeezer IDLE extension, which hasn't been accepted yet. I could create a patch just for idleConf if you'd like. Currently extension config is done by manually editing the above mentioned text files, but you mentioned wanting to specifiy the session file inside IDLE. I have written a generic configuration dialog for IDLE extensions which allows extension configuration inside IDLE, but I haven't posted it as a patch yet (not polished enough). Again, I could send you a working version if you like. You also mentioned wanting IDLE to prompt the user if the session hasn't been saved. Notice that IDLE does this when editing files. This is because the EditorWindow class defines a maybesave() method which does this, but OutputWindow (a subclass of EditorWindow, which PyShell inherits) overrides this method. You could override PyShell's maybesave() method with something similar to EditorWindow's method. EditorWindow.maybesave() actually calls IOBinding.maybesave()... which does a lot of work for you (such as remembering the filename, prompting for a filename if the buffer has never been saved, etc.). Not sure if this is exactly the functionality you want, but it's a starting point. I hope all this helps! (and that we have an awesome new IDLE extension soon :) Good luck, - Tal On 1/15/07, Saul Spatz wrote: > > On 12/27/06, Saul Spatz wrote: > >> > >> I am rather new to both python and IDLE. The references to IDLE at > >> www.python.org seem sadly out-of-date. I have a couple of simple > >> enhancements I would like to make to IDLE that are not likely to be of > >> general interest. (I want to use IDLE in teaching, and I want to save > >> the sessions, both user input and IDLE output. I would like IDLE to > >> remember where I saved the last session and default to that directory, > >> and I would like it to prompt me if I close the IDLE window without > >> having saved the session.) It seems like these should be easy to > >> program, but I can't find the IDLE source. > >> > > Thanks. I think I've figured out how to modify IDLE to do what I want. > Now, I'm having trouble figuring out how best to organize my changes so > they don't get clobbered by the next IDLE update. I'm trying to work > out how best to deal with packages and python namespaces. Here is a > sample of what I have worked out: > > #idle2.pyw > > import idlelib.PyShell > import time > from Tkinter import * > EditorWindow = idlelib.EditorWindow.EditorWindow > > class MyPyShell(idlelib.PyShell.PyShell): > def close2(self): > format = '%d%b%Y.%H%M%S.log' > path = "E:/MyPythonProjects/" > filename = path + time.strftime(format) > try: > log = open(filename,'w') > log.write(self.text.get(1.0,END)) > log.close() > except IOError: > pass > return EditorWindow.close(self) > > idlelib.PyShell.PyShell = MyPyShell > idlelib.PyShell.main() > > This seems to work. However, I don't really want the path to be > hard-coded into my program. I want to be able to select the directory, > and to control the logging behavior interactively. This means that I > will have to subclass ConfigDialog.ConfigDialog and perhaps other > classes as well. Am I likely to run into trouble with the approach > indicated above, and, in any case, is there a better way? > > I realize that this question has little to do with IDLE development, but > I don't know where else to turn for help. I'd be grateful if some guru > will give of his wisdom to a beginner. > > Thanks, > Saul > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20070115/181a90d9/attachment.html From sspatz at kcnet.com Mon Jan 15 17:58:44 2007 From: sspatz at kcnet.com (Saul Spatz) Date: Mon, 15 Jan 2007 10:58:44 -0600 Subject: [Idle-dev] Newbie Question In-Reply-To: <7afdee2f0701150326w2eee369dxfa0ae0d02494aaad@mail.gmail.com> References: <45929BD5.6010500@kcnet.com> <7afdee2f0612270923l79a4698o614ae9eee16d46a5@mail.gmail.com> <45AB0067.80506@kcnet.com> <7afdee2f0701150326w2eee369dxfa0ae0d02494aaad@mail.gmail.com> Message-ID: <45ABB2C4.9090906@kcnet.com> Thanks for all your help. I'm sure I'll be asking you for some of these patches, once I've done enough reading to know what I need, but I wanted to express my gratitude immediately. I seem to be getting my code to work, slowly, but I want to follow best practices, if I can. I've streamlined the functionality a bit, so some of these issues don't arise any more, I think. What I'm doing now is allowing the user to specify the directory for the log file either by typing it into an entry widget, or selecting it with a tkFileDialog.askdirectory dialog. Of course, if the user selects a directory with the dialog, I also update the text in the entry widget. If I understand you right, I'm going to have trouble saving this string in the configuration file and reading it back at startup. Thanks so much, Saul Tal Einat wrote: > You could (and probably should) make this an IDLE extension. This will > increase the chance that your changes will work with future changes in > IDLE, > and allow you to easily implement (and debug!) such changes when they > will > be required. For instance, you could easily switch your extension on > or off > in a config file, instead of running a different version of IDLE. > > For info on writing extensions, read the "extend.txt" file in > Lib\idlelib\, > and check out the code of existing extensions (FormatParagraph and > CodeContext are good examples). > > For a taste - when writing an extension, you write a class whose > contructor > recieves the EditorWindow instance as an argument. PyShell is a > subclass of > EditorWindow, so your extension will actually be recieving the PyShell > instance, which you can change you your liking. > > Also, you should use idleConf to save/load configuration; idleConf has an > 'extensions' section specifically for IDLE extensions. So you could write > file's default location in config-extensions.def, and each user can > choose a > location of his choice in his config-extensions.cfg. > > You can easily configure an extension to be enabled only for Shell > windows > by writing "enable_editor=0" in config_extensions.def. > > > Caveat: Writing paths in IDLE's config files requires reading/writing > them > as "raw" values, which idleConf currently doesn't allow. I have a simple > patch which allows idleConf to do this, but I sent it along with a > patch for > the Squeezer IDLE extension, which hasn't been accepted yet. I could > create > a patch just for idleConf if you'd like. > > Currently extension config is done by manually editing the above > mentioned > text files, but you mentioned wanting to specifiy the session file inside > IDLE. I have written a generic configuration dialog for IDLE extensions > which allows extension configuration inside IDLE, but I haven't posted > it as > a patch yet (not polished enough). Again, I could send you a working > version > if you like. > > > You also mentioned wanting IDLE to prompt the user if the session hasn't > been saved. Notice that IDLE does this when editing files. This is > because > the EditorWindow class defines a maybesave() method which does this, but > OutputWindow (a subclass of EditorWindow, which PyShell inherits) > overrides > this method. You could override PyShell's maybesave() method with > something > similar to EditorWindow's method. > > EditorWindow.maybesave() actually calls IOBinding.maybesave()... which > does > a lot of work for you (such as remembering the filename, prompting for a > filename if the buffer has never been saved, etc.). Not sure if this is > exactly the functionality you want, but it's a starting point. > > > I hope all this helps! (and that we have an awesome new IDLE extension > soon > :) > > Good luck, > - Tal > > > On 1/15/07, Saul Spatz wrote: > >> > On 12/27/06, Saul Spatz wrote: >> >> >> >> I am rather new to both python and IDLE. The references to IDLE at >> >> www.python.org seem sadly out-of-date. I have a couple of simple >> >> enhancements I would like to make to IDLE that are not likely to >> be of >> >> general interest. (I want to use IDLE in teaching, and I want to >> save >> >> the sessions, both user input and IDLE output. I would like IDLE to >> >> remember where I saved the last session and default to that >> directory, >> >> and I would like it to prompt me if I close the IDLE window without >> >> having saved the session.) It seems like these should be easy to >> >> program, but I can't find the IDLE source. >> >> >> >> Thanks. I think I've figured out how to modify IDLE to do what I want. >> Now, I'm having trouble figuring out how best to organize my changes so >> they don't get clobbered by the next IDLE update. I'm trying to work >> out how best to deal with packages and python namespaces. Here is a >> sample of what I have worked out: >> >> #idle2.pyw >> >> import idlelib.PyShell >> import time >> from Tkinter import * >> EditorWindow = idlelib.EditorWindow.EditorWindow >> >> class MyPyShell(idlelib.PyShell.PyShell): >> def close2(self): >> format = '%d%b%Y.%H%M%S.log' >> path = "E:/MyPythonProjects/" >> filename = path + time.strftime(format) >> try: >> log = open(filename,'w') >> log.write(self.text.get(1.0,END)) >> log.close() >> except IOError: >> pass >> return EditorWindow.close(self) >> >> idlelib.PyShell.PyShell = MyPyShell >> idlelib.PyShell.main() >> >> This seems to work. However, I don't really want the path to be >> hard-coded into my program. I want to be able to select the directory, >> and to control the logging behavior interactively. This means that I >> will have to subclass ConfigDialog.ConfigDialog and perhaps other >> classes as well. Am I likely to run into trouble with the approach >> indicated above, and, in any case, is there a better way? >> >> I realize that this question has little to do with IDLE development, but >> I don't know where else to turn for help. I'd be grateful if some guru >> will give of his wisdom to a beginner. >> >> Thanks, >> Saul >> >> > From taleinat at gmail.com Fri Jan 26 12:04:06 2007 From: taleinat at gmail.com (Tal Einat) Date: Fri, 26 Jan 2007 13:04:06 +0200 Subject: [Idle-dev] Erik Thompson's opinions on IDLE In-Reply-To: <7afdee2f0612271513p37585494m32e32aeefa365f5c@mail.gmail.com> References: <7afdee2f0611210816s165e0b48m19d2abfc5baa7963@mail.gmail.com> <87irgozmmx.fsf@hydra.bayview.thirdcreek.com> <7afdee2f0612271512u5585365bu88e676f8786a5806@mail.gmail.com> <7afdee2f0612271513p37585494m32e32aeefa365f5c@mail.gmail.com> Message-ID: <7afdee2f0701260304r7a883ae5odf0ba3d9b23dc005@mail.gmail.com> On 12/28/06, Tal Einat wrote: > > On 12/7/06, Kurt B. Kaiser wrote: > > > > > My top items: > > > > Incremental search (in a text entry widget in the bottom status bar). > > > > Display/modification of sys.argv, probably in the status bar, or maybe > > in a separate status bar which would appear when activated. > > > > A solid way to copy code from the Shell to an edit window (smart > > copy/paste doing tab conversion where necessary?). > > > > A way to cut text in the shell without restarting it when it gets too > > full (You lose the history when you restart the shell. Maybe save > > history across restarts?) > > > > Any comments or votes on the above? > > > A major feature I miss is a "Goto definition" function. I spend far too > much time manually searching for function and class definitions when working > with IDLE. > Another feature I would add is an "execfile in shell" menu item. This avoids module import/reload issues when you're just trying out code, and so is more convenient when developing. Comments please? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20070126/3e39122f/attachment.html From dblank at brynmawr.edu Fri Jan 26 16:17:39 2007 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Fri, 26 Jan 2007 10:17:39 -0500 Subject: [Idle-dev] Restart Shell and Run Module (was Erik Thompson's opinions on IDLE) In-Reply-To: <7afdee2f0701260304r7a883ae5odf0ba3d9b23dc005@mail.gmail.com> References: <7afdee2f0611210816s165e0b48m19d2abfc5baa7963@mail.gmail.com> <87irgozmmx.fsf@hydra.bayview.thirdcreek.com> <7afdee2f0612271512u5585365bu88e676f8786a5806@mail.gmail.com> <7afdee2f0612271513p37585494m32e32aeefa365f5c@mail.gmail.com> <7afdee2f0701260304r7a883ae5odf0ba3d9b23dc005@mail.gmail.com> Message-ID: <45BA1B93.7090001@brynmawr.edu> Tal Einat wrote: [snip] > Another feature I would add is an "execfile in shell" menu item. This > avoids module import/reload issues when you're just trying out code, and > so is more convenient when developing. > > Comments please? This is something that we needed in the courses that we are teaching with Python and robots; it is too painful to have to reconnect to the robot each time you load new code. Of course, this is only needed when you are running with subprocesses. This makes running with subprocesses and without subprocesses more consistent with each other. The relevant diffs are below. (Let me know if you want more information.) -Doug Differences for ScriptBinding.py: 50,52c50 < ('Run Module', '<>'), < ('Restart Shell and Run Module', '<>'), < ]), ] --- > ('Run Module', '<>'), ]), ] 132,135c130 < def restart_and_run_module_event(self, event): < self.run_module_event(event, 1) < < def run_module_event(self, event, restart = 0): --- > def run_module_event(self, event): 152c147 < if PyShell.use_subprocess and restart: --- > if PyShell.use_subprocess: Differences for config-extensions.def: 51d50 < restart-and-run-module= 82,90d80 < < [AutoComplete] < enable=1 < popupwait=2000 < [AutoComplete_cfgBindings] < force-open-completions= < [AutoComplete_bindings] < autocomplete= < try-open-completions= From taleinat at gmail.com Sun Jan 28 16:15:50 2007 From: taleinat at gmail.com (Tal Einat) Date: Sun, 28 Jan 2007 17:15:50 +0200 Subject: [Idle-dev] Extensions overriding EditorWindow methods Message-ID: <7afdee2f0701280715o1740ec9au330e1ae314945fb@mail.gmail.com> Hi all, I'm close to finishing an initial version of a search bar for IDLE which implements incremental searching. I'm writing it as an IDLE extension, so that it can be turned on or off by each user as he likes, through the extensions config. For this I need a way to hook onto EditorWindow's find_event(), find_again_event(), ... methods. An extension's constructor receives the EditorWindow instance, so overriding the methods is easy. However, EditorWindow binds its methods to events in its constructor, so overriding an instance's methods doesn't change the method called by the event binding mechanism. English translation - overriding doesn't work, I need to rebind the relevant events to new functions/methods. Solutions: 1) Rebind the events to new handlers in the extension's constructor Ugly? Code duplication... 2) Bind all events to a virtual handler, which calls the instance's currently bound appropriate method Cleaner but more complex, this is actually duplicating the functionality of the event binding mechanism! I was leaning towards 2 but am now thinking 1 is better, since it's simpler and more consistent. Any thoughts on this? Any other, better solutions? - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20070128/44265b26/attachment.htm From taleinat at gmail.com Mon Jan 29 00:40:46 2007 From: taleinat at gmail.com (Tal Einat) Date: Mon, 29 Jan 2007 01:40:46 +0200 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! Message-ID: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> 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 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: http://mail.python.org/pipermail/idle-dev/attachments/20070129/51341d3b/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SearchBar.py Type: text/x-python Size: 22882 bytes Desc: not available Url : http://mail.python.org/pipermail/idle-dev/attachments/20070129/51341d3b/attachment-0002.py -------------- next part -------------- A non-text attachment was scrubbed... Name: WindowSearchEngine.py Type: text/x-python Size: 4967 bytes Desc: not available Url : http://mail.python.org/pipermail/idle-dev/attachments/20070129/51341d3b/attachment-0003.py From michael at d2m.at Mon Jan 29 08:56:31 2007 From: michael at d2m.at (Michael Haubenwallner) Date: Mon, 29 Jan 2007 08:56:31 +0100 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> Message-ID: <45BDA8AF.5050306@d2m.at> 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) > Cool, this is an great enrichment. Installation and usage is without any problems (working from win2k, python2.4.4 and python2.5.0). Two suggestions come to my mind: - can we have the window height stay the same ( if the window is not fullscreen a new row is added atm) - i am used to the close button in the firefox searchbar, removing the searchbar is not easy atm, selecting "Find..." (CTRL-F) again throws a dialog "Error: Empty regular expression" Michael -- http://zope.org/Members/d2m http://planetzope.org From franz.steinhaeusler at gmx.at Mon Jan 29 09:11:24 2007 From: franz.steinhaeusler at gmx.at (Franz Steinhaeusler) Date: Mon, 29 Jan 2007 09:11:24 +0100 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> Message-ID: <3tarr29dhbaq8u7fo877cop09n72c9bsrv@4ax.com> On Mon, 29 Jan 2007 01:40:46 +0200, "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 Hello Tal, cool, nice extension, I like it and it works (Python 24 on Windows XP) (But I use almost every time pycrust, because it is written in wxPython :) ) -- Franz Steinhaeusler From taleinat at gmail.com Mon Jan 29 12:50:58 2007 From: taleinat at gmail.com (Tal Einat) Date: Mon, 29 Jan 2007 13:50:58 +0200 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <45BDA8AF.5050306@d2m.at> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> <45BDA8AF.5050306@d2m.at> Message-ID: <7afdee2f0701290350i6a75606anb3fcf0cb8aefadc0@mail.gmail.com> On 1/29/07, Michael Haubenwallner wrote: > > > Cool, this is an great enrichment. Installation and usage is without any > problems (working from win2k, python2.4.4 and python2.5.0). > > Two suggestions come to my mind: > - can we have the window height stay the same ( if the window is not > fullscreen a new row is added atm) > - i am used to the close button in the firefox searchbar, removing the > searchbar is not easy atm, selecting "Find..." (CTRL-F) again throws > a dialog "Error: Empty regular expression" > > Michael > > -- > http://zope.org/Members/d2m > http://planetzope.org > Thanks for the suggestions! Updated files attached. There's no need for a close button - to stop searching hit Escape or click anywhere away from the search bar. (Sorry, I should have mentioned this in the usage.) When you hit Ctrl+f with the search bar active, it searches for whatever you've typed. The message box was popping up because the search expression was empty. I've changed this, now it just beeps. I've fixed the window height issue, including window maximization issues and making sure the current text is not hidden by the search bar popping up. Works smoothly on Windows, need testers on other platforms to check this out. - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20070129/f84cb0fa/attachment-0001.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: SearchBar.py Type: text/x-python Size: 23292 bytes Desc: not available Url : http://mail.python.org/pipermail/idle-dev/attachments/20070129/f84cb0fa/attachment-0002.py -------------- next part -------------- A non-text attachment was scrubbed... Name: WindowSearchEngine.py Type: text/x-python Size: 4967 bytes Desc: not available Url : http://mail.python.org/pipermail/idle-dev/attachments/20070129/f84cb0fa/attachment-0003.py From bbands at gmail.com Mon Jan 29 14:53:02 2007 From: bbands at gmail.com (BBands) Date: Mon, 29 Jan 2007 05:53:02 -0800 Subject: [Idle-dev] SearchBar - Have fun searching in IDLE! In-Reply-To: <7afdee2f0701290350i6a75606anb3fcf0cb8aefadc0@mail.gmail.com> References: <7afdee2f0701281540jc5a9fa3x176ec90f0f1631fb@mail.gmail.com> <45BDA8AF.5050306@d2m.at> <7afdee2f0701290350i6a75606anb3fcf0cb8aefadc0@mail.gmail.com> Message-ID: <6e8360ad0701290553g42ad0b89ne308a19187eaedc4@mail.gmail.com> On 1/29/07, Tal Einat wrote: > I've fixed the window height issue, including window maximization issues and > making sure the current text is not hidden by the search bar popping up. > Works smoothly on Windows, need testers on other platforms to check this > out. At first blush this works well on SUSE 10.1 with Python 2.4.2. Thanks, jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning.