Popular recipes tagged "meta:loc=152"http://code.activestate.com/recipes/tags/meta:loc=152/2017-04-07T12:30:13-07:00ActiveState Code RecipesTag entry for Tkinter like Jquery Tag It (Python)
2017-04-07T12:30:13-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580734-tag-entry-for-tkinter-like-jquery-tag-it/
<p style="color: grey">
Python
recipe 580734
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/tag/">tag</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 2.
</p>
<p>Tag editing widget for tkinter. It's similar to jQuery tag it:
<a href="http://aehlke.github.io/tag-it/" rel="nofollow">http://aehlke.github.io/tag-it/</a></p>
Automatic resized Text widget (Tkinter) (Python)
2016-12-10T15:40:25-08:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/578886-automatic-resized-text-widget-tkinter/
<p style="color: grey">
Python
recipe 578886
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/autoresize/">autoresize</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 14.
</p>
<p>The Text widget resize to its contents.
Based on this:
<a href="https://stackoverflow.com/questions/11544187/tkinter-resize-text-to-contents" rel="nofollow">https://stackoverflow.com/questions/11544187/tkinter-resize-text-to-contents</a></p>
<p>But here there is one important improvement:
The widget resize first, before a character inclusion.</p>
<p>For this trick I have had to use tag bindings.</p>
<p>Here there is a practical application of this widget:</p>
<p><a href="https://code.activestate.com/recipes/578885-draggable-desktop-note-or-sticky-notes-in-tkinter/" rel="nofollow">https://code.activestate.com/recipes/578885-draggable-desktop-note-or-sticky-notes-in-tkinter/</a></p>
NondurableLogger class for use with concurrent.futures.ProcessPoolExecutor's submit and map methods (Python)
2014-02-10T17:50:59-08:00Peter Santorohttp://code.activestate.com/recipes/users/4189027/http://code.activestate.com/recipes/578827-nondurablelogger-class-for-use-with-concurrentfutu/
<p style="color: grey">
Python
recipe 578827
by <a href="/recipes/users/4189027/">Peter Santoro</a>
(<a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/multiprocessing/">multiprocessing</a>).
Revision 2.
</p>
<p>I needed a simple logging solution that I could use with with concurrent.futures.ProcessPoolExecutor and this is my initial recipe.</p>
Nested contexts -- a chain of mapping objects (Python)
2010-10-25T02:13:37-07:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/577434-nested-contexts-a-chain-of-mapping-objects/
<p style="color: grey">
Python
recipe 577434
by <a href="/recipes/users/178123/">Raymond Hettinger</a>
(<a href="/recipes/tags/ast/">ast</a>, <a href="/recipes/tags/chained/">chained</a>, <a href="/recipes/tags/compiler/">compiler</a>, <a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/inheritance/">inheritance</a>, <a href="/recipes/tags/nested/">nested</a>, <a href="/recipes/tags/nonlocal/">nonlocal</a>, <a href="/recipes/tags/scopes/">scopes</a>, <a href="/recipes/tags/xml/">xml</a>).
Revision 2.
</p>
<p>Easy to use chain of dictionaries for crafting nested scopes or for a tree of scopes. Useful for analyzing AST nodes, XML nodes or other structures with multiple scopes. Can emulate various chaining styles including static/lexical scoping, dynamic scoping and Python's own globals(), locals(), nested scopes, and writeable nonlocals. Can also model Python's inheritance chains: instance dictionary, class dictionary, and base classes.</p>
Fibonacci Data Compression (Python)
2011-01-28T04:18:30-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577554-fibonacci-data-compression/
<p style="color: grey">
Python
recipe 577554
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/data_compression/">data_compression</a>).
</p>
<p>Data compression via Fibonacci encoding.</p>
ToolTip for Tkinter (Python)
2009-03-11T15:58:45-07:00Tucker Beckhttp://code.activestate.com/recipes/users/4169378/http://code.activestate.com/recipes/576688-tooltip-for-tkinter/
<p style="color: grey">
Python
recipe 576688
by <a href="/recipes/users/4169378/">Tucker Beck</a>
(<a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/tooltip/">tooltip</a>).
</p>
<p>Provides a ToolTip for Tkinter widgets</p>
twvalidator: a Markup Validator Gateway for Twisted Web (Python)
2007-01-17T04:00:20-08:00Manlio Perillohttp://code.activestate.com/recipes/users/2425438/http://code.activestate.com/recipes/500263-twvalidator-a-markup-validator-gateway-for-twisted/
<p style="color: grey">
Python
recipe 500263
by <a href="/recipes/users/2425438/">Manlio Perillo</a>
(<a href="/recipes/tags/web/">web</a>).
</p>
<p>twvalidator is a simple markup validator gateway you can embed in your
Twisted Web application for validating all your pages.</p>
Scripted Telnet Client Class (Tcl)
2006-09-12T21:13:56-07:00Flavio Salgueirohttp://code.activestate.com/recipes/users/2418930/http://code.activestate.com/recipes/496990-scripted-telnet-client-class/
<p style="color: grey">
Tcl
recipe 496990
by <a href="/recipes/users/2418930/">Flavio Salgueiro</a>
(<a href="/recipes/tags/network/">network</a>).
Revision 2.
</p>
<p>A simlpe Telnet Client Class utilizing Todd Martin's telnet package available at <a href="http://www.tmartin.org/tcltelnet" rel="nofollow">http://www.tmartin.org/tcltelnet</a> .</p>
Stripchart Plotter (Python)
2005-05-06T06:04:05-07:00Flávio Codeço Coelhohttp://code.activestate.com/recipes/users/2270289/http://code.activestate.com/recipes/413432-stripchart-plotter/
<p style="color: grey">
Python
recipe 413432
by <a href="/recipes/users/2270289/">Flávio Codeço Coelho</a>
(<a href="/recipes/tags/graphics/">graphics</a>).
</p>
<p>OpenGL Stripchart plotter for a user defined number of channels.</p>
Barebones VC++ code: invoking Python COM factory and factory-made COM object (Python)
2002-07-27T11:44:45-07:00Bill Bellhttp://code.activestate.com/recipes/users/98151/http://code.activestate.com/recipes/141602-barebones-vc-code-invoking-python-com-factory-and-/
<p style="color: grey">
Python
recipe 141602
by <a href="/recipes/users/98151/">Bill Bell</a>
(<a href="/recipes/tags/extending/">extending</a>).
</p>
<p>Two items:</p>
<ol>
<li>Python script that defines and registers a factory COM class and another COM class that can be instantiated by the factory.</li>
<li>(Ugly) VC++ code that exercises the factory and then the object returned by the factory.</li>
</ol>
<p>The Python COM object returned by the factory provides rudimentary stemming; ie, it removes any final 's' from a word that is passed to it and returns the truncated word as its result.</p>