<div dir="ltr">I&#39;ve finally found the time to fix up SearchBar - the powerful replacement for IDLE&#39;s feeble search capabilities. It supports all of the original search engine&#39;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.<br>

<br>I hope this is now almost ready for including in IDLE out-of-the-box. I&#39;ve fixed all outstanding issues, cleaned up and optimized the code, and added comments and documentation where needed.<br>

<br>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&#39;d appreciate anyone who can give it a try and see how it works out, especially non-Windows users.<br><br><br><b>Installation:</b> (see the included README file)<br>

Unpack the attached archive, or download from <a href="http://pypi.python.org/pypi/SearchBar/">http://pypi.python.org/pypi/SearchBar/</a><br>Place the .py files in your Lib/idlelib directory, and add the following to the text file Lib\idlelib\config-extensions.def:<br>

<br>
<span style="font-family: courier new,monospace;">[SearchBar]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
enable=1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
is_incremental=1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
[Searchbar_bindings]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
toggle-search-bar=</span><br>
<br><span style="font-weight: bold;">Usage:</span><br>
Just search as usual. (When the extension is enabled it binds to the usual find/replace events.)<br><ul><li>Enter, Control+f and Control+g all search for the next appearance<br></li><li>The Escape key closes the search bar, and so will clicking outside of it</li>



<li>
Alt+/ completes words in the find and replace entries, press multiple times to cycle through possible completions<br></li><li>When replacing: Enter replaces and jumps to the next appearance, Shift+Enter jumps to the next appearance without replacing</li>


<li>Incremental searching can be toggled via the extension configuration</li>
</ul><br><div class="gmail_quote">On Mon, Jan 29, 2007 at 2:40 AM, Tal Einat <span dir="ltr">&lt;<a href="mailto:taleinat@gmail.com" target="_blank">taleinat@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



Attached is a first working version of the SearchBar extension,
with <span style="text-decoration: underline;">incremental search</span> and <span style="text-decoration: underline;">word completion</span>.<br><br>What I need now is beta testers! <span style="font-style: italic;">Please 
</span>take the 2 minutes it takes to install this, and report and issues or comments.<br>
(You can always disable the extension in config-extensions.def (enable=0), and the good old dialogs will kick in.)<br>
<br>
* AFAIK this -should- work
with all recent versions of IDLE (those shipped with Python2.2 and
above).<br>

<br>Enjoy!<br>

Comments et. al. much appreciated.<br>
<br>- Tal<br><br><br>
<span style="font-weight: bold;">Usage:</span><br>
Just search as usual. When the extension is enabled it binds to the usual find/replace events.<br>
To complete words in the find and replace entries: Alt+/  (&quot;slash&quot;, on the question mark key)<br>
<br>
<span style="font-weight: bold;">Installation:</span><br>
Place the attached files in your idlelib dir,<br>
and add the following lines to config-extensions.def:<br>
&quot;<br>
[SearchBar]<br>
enable=1<br>
is_incremental=1<br>
[Searchbar_bindings]<br>
toggle-search-bar=<br>
&quot;<br><br>(yes, the last 2 lines <span style="text-decoration: underline;">are</span> required)<br>
<br><br><div><span class="gmail_quote">On 12/8/06, <b class="gmail_sendername">Tal Einat</b> &lt;<a href="mailto:taleinat@gmail.com" target="_blank">taleinat@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<br><br>
<div><span><span class="gmail_quote">On 12/7/06, <b class="gmail_sendername">Michael Foord</b> &lt;<a href="mailto:fuzzyman@voidspace.org.uk" target="_blank">
fuzzyman@voidspace.org.uk</a>&gt; wrote:</span>
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span>Kurt B. Kaiser wrote:<br>&gt; My top items:<br>[snip]<br></span></blockquote>
<span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">&gt; Incremental search (in a text entry widget in the bottom status bar).<br>&gt;<br><br>+1 million. :-)
<br>
<br>Not because I need it, but just because it&#39;s the best way.</blockquote>
<div> </div></span>
<div>I&#39;ve been working some on that too. I&#39;ve created a Search Bar extension which can be used instead of the Find &amp; 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).
</div></div></blockquote><br></div>
</blockquote></div><br></div>