Popular recipes tagged "meta:loc=193"http://code.activestate.com/recipes/tags/meta:loc=193/2017-04-10T21:14:36-07:00ActiveState Code RecipesMetro Spinner for Tkinter (Python) 2017-04-10T21:14:36-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580777-metro-spinner-for-tkinter/ <p style="color: grey"> Python recipe 580777 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/canvas/">canvas</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/rotation/">rotation</a>, <a href="/recipes/tags/spinner/">spinner</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>I create a rotating image class <em>RotatingIcon</em> inspired and based on this code:</p> <p><a href="http://stackoverflow.com/questions/15736530/python-tkinter-rotate-image-animation" rel="nofollow">http://stackoverflow.com/questions/15736530/python-tkinter-rotate-image-animation</a></p> <p>Features:</p> <ul> <li>Methods to stop and start the animation</li> <li>The animation automically stops when the window is not mapped, and the animation continues when the window is mapped again</li> <li>Time setting to control the speed of the animation</li> <li>All the formats accepted for PIL could be used. XBM format is automatically converted to Tk Bitmap. The advantage of Bitmats is the possibility to change the color of the foreground.</li> </ul> <p>I added 6 different styles of spinners with different sizes.</p> <p>I used fontawesome.io for the icon generation.</p> <p>For more metro widgets see here:</p> <p><a href="https://code.activestate.com/recipes/580729-metro-ui-tkinter/" rel="nofollow">https://code.activestate.com/recipes/580729-metro-ui-tkinter/</a></p> StatusMeter widget for Tkinter (Python) 2009-03-02T19:24:38-08:00Tucker Beckhttp://code.activestate.com/recipes/users/4169378/http://code.activestate.com/recipes/576674-statusmeter-widget-for-tkinter/ <p style="color: grey"> Python recipe 576674 by <a href="/recipes/users/4169378/">Tucker Beck</a> (<a href="/recipes/tags/meter/">meter</a>, <a href="/recipes/tags/progress/">progress</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>Provides a status meter that displays the current status of a running function, percentage completion of that function, and allows cancellation of that function. This helps for long-running tasks that need to run without blocking the GUI and should display their progress to a user.</p> WxGrepDialog - Iterative construction of regular expressions (Python) 2008-07-18T08:48:01-07:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/576364-wxgrepdialog-iterative-construction-of-regular-exp/ <p style="color: grey"> Python recipe 576364 by <a href="/recipes/users/4076953/">Jack Trainor</a> (<a href="/recipes/tags/text/">text</a>). </p> <p>WxGrepDialog is a small GUI utility for testing regular expressions on specified text in main console window, allowing iterative development of working regular expressions.</p> Implementation of sets using sorted lists (Python) 2007-05-19T07:07:23-07:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/230113-implementation-of-sets-using-sorted-lists/ <p style="color: grey"> Python recipe 230113 by <a href="/recipes/users/178123/">Raymond Hettinger</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). Revision 2. </p> <p>Inspired by Py2.3's TimSort, this implementation of sets.py uses sorted lists instead of dictionaries. For clumped data patterns, the set operations can be super-efficient (for example, two sets can be determined to be disjoint with only O(n) comparisons). Also note, that the set elements are <em>not</em> required to be hashable; this provides a great deal more freedom than dictionary based implementations.</p>