Popular recipes tagged "tkinter" and "python"http://code.activestate.com/recipes/tags/tkinter+python/2016-01-27T22:22:01-08:00ActiveState Code RecipesSimple drawing tool with Python turtle graphics (Python)
2016-01-27T22:22:01-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580544-simple-drawing-tool-with-python-turtle-graphics/
<p style="color: grey">
Python
recipe 580544
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/drawing/">drawing</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python2/">python2</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/turtle/">turtle</a>).
</p>
<p>A simple drawing program that lets you use your keyboard to draw figures on screen, using the turtle graphics module built into Python.</p>
Python Mandelbrot Fractal with Tkinter (Python)
2015-05-06T09:57:27-07:00Antoni Gualhttp://code.activestate.com/recipes/users/4182514/http://code.activestate.com/recipes/579048-python-mandelbrot-fractal-with-tkinter/
<p style="color: grey">
Python
recipe 579048
by <a href="/recipes/users/4182514/">Antoni Gual</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 9.
</p>
<p>Displays in a Tk window a pretty coloured 640x480 Mandelbrot set in 6 seconds. Calculates each one of the 300K pixels with a maximum of 256 iterations. <br>
Only Tkinter used. Tested with Python 3.4 <br>
I will test any contribution and add it to the code if worthy.</p>
Animated raster graphics demo in Tkinter (Python)
2015-05-05T20:26:41-07:00Antoni Gualhttp://code.activestate.com/recipes/users/4182514/http://code.activestate.com/recipes/579052-animated-raster-graphics-demo-in-tkinter/
<p style="color: grey">
Python
recipe 579052
by <a href="/recipes/users/4182514/">Antoni Gual</a>
(<a href="/recipes/tags/animation/">animation</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 4.
</p>
<p>EDITED:
A small animated graphics demo in Tkinter, displaying a 1990's style Rotozoom, more interesting than the TV snow I posted previously. The Tkinter management part is just the same. The code is a little longer as some trig tables must be precalculated for speed. The window size corresponds to the resolution of the old DOS screen 13, as I originally coded the demo for Qbasic. </p>
Accordion Widget (Tkinter) (Python)
2014-07-18T11:39:51-07:00Peter Mojeikohttp://code.activestate.com/recipes/users/4190241/http://code.activestate.com/recipes/578911-accordion-widget-tkinter/
<p style="color: grey">
Python
recipe 578911
by <a href="/recipes/users/4190241/">Peter Mojeiko</a>
(<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
</p>
<p>An expanding/collapsing widget for Tkinter.</p>
<p>usage:</p>
<pre class="prettyprint"><code>from accordion import Accordion, Chord
root = Tk()
accordion = Accordion(root)
accordion.pack()
chord1 = Chord(accordion, title='Chord')
# create widgets and give them chord1 as parent
accordion.append_chords([chord1])
root.mainloop()
</code></pre>
<p>There's a more detailed example at the bottom of the file.</p>
Setting up a listbox filter in Tkinter(python 2.7) (Python)
2014-04-10T10:25:38-07:00Wyklephhttp://code.activestate.com/recipes/users/4189735/http://code.activestate.com/recipes/578860-setting-up-a-listbox-filter-in-tkinterpython-27/
<p style="color: grey">
Python
recipe 578860
by <a href="/recipes/users/4189735/">Wykleph</a>
(<a href="/recipes/tags/filter/">filter</a>, <a href="/recipes/tags/listbox/">listbox</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/search/">search</a>, <a href="/recipes/tags/searchbar/">searchbar</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 3.
</p>
<p>If you have a listbox and need to filter the contents of the listbox based on the contents of an entry field, this will help you! Shoutout to Nikola-K for the revision. It's much simpler now :D</p>
SuperText - Scrollable text with pop-up menu and themes for Tkinter (Python)
2014-06-20T16:25:43-07:00Peter Mojeikohttp://code.activestate.com/recipes/users/4190241/http://code.activestate.com/recipes/578897-supertext-scrollable-text-with-pop-up-menu-and-the/
<p style="color: grey">
Python
recipe 578897
by <a href="/recipes/users/4190241/">Peter Mojeiko</a>
(<a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/text_enriched/">text_enriched</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
</p>
<p>Two things I consistently need when using a Text widget are scrollbars and pop-up menus. I've been adding them in on the fly for a while, but I think this class provides an easier way to implement these features.</p>
<p>I also added a couple of very minimal themes:</p>
<pre class="prettyprint"><code>1. The terminal theme replaces the standard Text cursor with a blocky-style
insert cursor
2. The typewriter theme takes any text that has been inserted before it is called
and types it to the widget, one character at a time
</code></pre>
<p>There's an example of use at the bottom of the code.</p>
Parallel Paned Windows (Version1) (Python)
2014-06-03T20:33:34-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/578872-parallel-paned-windows-version1/
<p style="color: grey">
Python
recipe 578872
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/dragging/">dragging</a>, <a href="/recipes/tags/pannedwindow/">pannedwindow</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/synchronous/">synchronous</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 4.
</p>
<p>This version doesn't work ok. Instead see my new version:
<a href="https://code.activestate.com/recipes/578873-moving-several-panels-at-the-same-time-tkinter/" rel="nofollow">https://code.activestate.com/recipes/578873-moving-several-panels-at-the-same-time-tkinter/</a></p>
Wasted Money Calculator (Python)
2012-01-26T02:27:25-08:00userendhttp://code.activestate.com/recipes/users/4179007/http://code.activestate.com/recipes/578026-wasted-money-calculator/
<p style="color: grey">
Python
recipe 578026
by <a href="/recipes/users/4179007/">userend</a>
(<a href="/recipes/tags/calculate/">calculate</a>, <a href="/recipes/tags/calculator/">calculator</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/money/">money</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/save/">save</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 2.
</p>
<p>Calculate the amount of money you waste on the unnecessary items you buy everyday. </p>
Tkinter Splash Screen (Python)
2010-06-21T18:09:06-07:00Sunjay Varmahttp://code.activestate.com/recipes/users/4174115/http://code.activestate.com/recipes/577271-tkinter-splash-screen/
<p style="color: grey">
Python
recipe 577271
by <a href="/recipes/users/4174115/">Sunjay Varma</a>
(<a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/screen/">screen</a>, <a href="/recipes/tags/splash/">splash</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
</p>
<p>I wanted to mess around with the overrideredirect function of the window manager, and ended up making a pretty good Python Tkinter splash screen. :)</p>
<p>Just run it for a demo.</p>
<p>There are instructions and more info in the script</p>
Python Tkinter Tabs (Python)
2010-06-15T01:50:58-07:00Sunjay Varmahttp://code.activestate.com/recipes/users/4174115/http://code.activestate.com/recipes/577261-python-tkinter-tabs/
<p style="color: grey">
Python
recipe 577261
by <a href="/recipes/users/4174115/">Sunjay Varma</a>
(<a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sunjay/">sunjay</a>, <a href="/recipes/tags/tabs/">tabs</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/varma/">varma</a>).
Revision 4.
</p>
<p>This tabbed interface is very useful for Tkinter users. I am sure there is a better way to do it, but I did the best I could.</p>
<p>Please enjoy this tabbed interface by SunjayVarma - <a href="http://www.sunjay-varma.com" rel="nofollow">www.sunjay-varma.com</a></p>
<p>UPDATES:
Fixed the index issues. Made it easier to use.</p>