Popular recipes tagged "gui" but not "utility"http://code.activestate.com/recipes/tags/gui-utility/2015-07-06T23:15:31-07:00ActiveState Code Recipesbookmarks browser for firefox (Python) 2015-07-06T23:15:31-07:00Anton Vredegoorhttp://code.activestate.com/recipes/users/2667360/http://code.activestate.com/recipes/579077-bookmarks-browser-for-firefox/ <p style="color: grey"> Python recipe 579077 by <a href="/recipes/users/2667360/">Anton Vredegoor</a> (<a href="/recipes/tags/bookmarks/">bookmarks</a>, <a href="/recipes/tags/firefox/">firefox</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>a small tkinter gui to browse the .json type bookmark files firefox automatically generates each day. It's meant to be run from a terminal. If a tree item is doubleclicked it prints the uri.</p> A Simple Calculator (Tcl) 2014-09-06T13:36:35-07:00Mike Manilonehttp://code.activestate.com/recipes/users/4190728/http://code.activestate.com/recipes/578929-a-simple-calculator/ <p style="color: grey"> Tcl recipe 578929 by <a href="/recipes/users/4190728/">Mike Manilone</a> (<a href="/recipes/tags/calculator/">calculator</a>, <a href="/recipes/tags/gui/">gui</a>). </p> <p>A simple calculator. Calculation is done by [expr].</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> Stopwatch in 26 lines (Tcl) 2014-09-05T13:33:13-07:00Mike Manilonehttp://code.activestate.com/recipes/users/4190728/http://code.activestate.com/recipes/578927-stopwatch-in-26-lines/ <p style="color: grey"> Tcl recipe 578927 by <a href="/recipes/users/4190728/">Mike Manilone</a> (<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/time/">time</a>). </p> <p>This stopwatch works on Tcl/Tk 8.5 and higher. It makes use of the [clock] command and reduced the amount of code by -textvariable. A simple one, indeed. Nevertheless, it is still easy-to-read and easy-to-understand and it does show the power that Tcl has.</p> All in one Area Calculator (Python) 2014-07-03T09:16:14-07:00karimhttp://code.activestate.com/recipes/users/4190244/http://code.activestate.com/recipes/578901-all-in-one-area-calculator/ <p style="color: grey"> Python recipe 578901 by <a href="/recipes/users/4190244/">karim</a> (<a href="/recipes/tags/calculator/">calculator</a>, <a href="/recipes/tags/circlearea/">circlearea</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/python3/">python3</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/tranglearea/">tranglearea</a>, <a href="/recipes/tags/trianglearea/">trianglearea</a>). Revision 2. </p> <p>Its a python 3 based All in one Area Calculator.you can calculate Area of Rectangle,Area of Triangle and Area of Circle</p> Delete a Gtk.TreeView row (Python) 2013-11-27T13:59:58-08:00Anonimistahttp://code.activestate.com/recipes/users/4188571/http://code.activestate.com/recipes/578773-delete-a-gtktreeview-row/ <p style="color: grey"> Python recipe 578773 by <a href="/recipes/users/4188571/">Anonimista</a> (<a href="/recipes/tags/gtk/">gtk</a>, <a href="/recipes/tags/gui/">gui</a>). </p> <p>Delete a Gtk.TreeView row</p> A Phone Book GUI Built in wxPython Connected To Database Using Data Grid View (Python) 2013-09-29T19:25:23-07:00toufic zaarourhttp://code.activestate.com/recipes/users/4187866/http://code.activestate.com/recipes/578676-a-phone-book-gui-built-in-wxpython-connected-to-da/ <p style="color: grey"> Python recipe 578676 by <a href="/recipes/users/4187866/">toufic zaarour</a> (<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/datagridview/">datagridview</a>, <a href="/recipes/tags/graphical/">graphical</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/interface/">interface</a>). </p> <p>this GUI as simple as it is explains some basic but important graphical database interfacing; "Add", "Edit","Delete","Search" and few others along with a data grid view. in order to work create an sqlite3 database as follows:</p> <p>data table : Phone, column 1 : ID, column 2 : name, column 3 : surname, column 4 : telephone.</p> <p>save the sqlite3 file as file.db in a folder called Data and place it in the same directory as your python script.</p> <p>if you want to create the sqlite3 database graphically use my previous post : <a href="http://code.activestate.com/recipes/578665-a-wxpython-gui-to-create-sqlite3-databases/" rel="nofollow">http://code.activestate.com/recipes/578665-a-wxpython-gui-to-create-sqlite3-databases/</a></p> <p>Also there is more: I did not use auto-number for 'id' because I also wanted to include in the code a renumbering script.</p> <p>I am pleased to receive all the suggestions and improvements on this site or to my e-mail directly if this is convenient to you.</p> <p>note: if you don't like the database table name, and columns name create your own but make sure to change them in the code as well! in the end life is great! remember that!</p> A wxPython GUI To Create Sqlite3 Databases (Python) 2013-09-18T23:05:51-07:00toufic zaarourhttp://code.activestate.com/recipes/users/4187866/http://code.activestate.com/recipes/578665-a-wxpython-gui-to-create-sqlite3-databases/ <p style="color: grey"> Python recipe 578665 by <a href="/recipes/users/4187866/">toufic zaarour</a> (<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/wxpython/">wxpython</a>). Revision 2. </p> <p>A GUI built around wxPython in a way that will allow you to add to this application other forms and functionalities. The main DialogBox is to create,in a fast way, Sqlite3 databases that are used for web or applications development. In order to work properly, save the script in a separate directory.There is also more; each time you create a database a text file named "CreationLog.txt" will be created (for the first time you use the application or if it is not there) and updated, describing when and where was your database created and with what SQL query. I am pleased to receive all the suggestions and improvements on this site or to my e-mail directly if this is convenient to you.</p> Use Gtk.TreeView to browse MySql databases (Python) 2013-11-27T14:06:20-08:00Anonimistahttp://code.activestate.com/recipes/users/4188571/http://code.activestate.com/recipes/578775-use-gtktreeview-to-browse-mysql-databases/ <p style="color: grey"> Python recipe 578775 by <a href="/recipes/users/4188571/">Anonimista</a> (<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/mysqldb/">mysqldb</a>, <a href="/recipes/tags/user_interface/">user_interface</a>). </p> <p>Use Gtk.TreeView to browse MySql database structure from database to tables and views and to columns</p> List MySql databases in a Gtk.TreeView (Python) 2013-11-27T14:03:21-08:00Anonimistahttp://code.activestate.com/recipes/users/4188571/http://code.activestate.com/recipes/578774-list-mysql-databases-in-a-gtktreeview/ <p style="color: grey"> Python recipe 578774 by <a href="/recipes/users/4188571/">Anonimista</a> (<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/gtk/">gtk</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/mysqldb/">mysqldb</a>, <a href="/recipes/tags/user_interface/">user_interface</a>). </p> <p>List MySql databases in a Gtk.TreeView</p> Music Downloader with Wx GUI! (Python) 2013-11-05T02:52:29-08:00Christian Careagahttp://code.activestate.com/recipes/users/4186639/http://code.activestate.com/recipes/578681-music-downloader-with-wx-gui/ <p style="color: grey"> Python recipe 578681 by <a href="/recipes/users/4186639/">Christian Careaga</a> (<a href="/recipes/tags/beautifulsoup/">beautifulsoup</a>, <a href="/recipes/tags/downloader/">downloader</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/music/">music</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/urllib/">urllib</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/wxpyton/">wxpyton</a>). </p> <p>Just type in a song and the artist and the program will get the YouTube video, convert it to an mp3 then download it! It has a high quality function and a medium quality function and also the user can choose the directory and name they want the file to be saved to!</p> <p>It is the first time I've used threads and my second time with WxPython! I used BeautifulSoup for the scraping and I'm pretty familiar with that.just thought id share it with you guys and see if you have any feedback or suggestions!</p> <p>also you may get an error saying self.convhtml doesn't exist just wait then retry</p> <p>Here is a link to an screenshot:</p> <p><a href="http://adf.ly/XJaoU" rel="nofollow">http://adf.ly/XJaoU</a></p> <p>if you want you can checkout the Github page:</p> <p><a href="http://adf.ly/XGL6P" rel="nofollow">http://adf.ly/XGL6P</a></p> <p>also you will need to make a folder called Files and put a file called dir.txt and in the file write /Files. this is where the music will be downloaded to!</p> <p>I just made the .exe so you can just use that and its easier! Here: <a href="http://adf.ly/XRjRH" rel="nofollow">http://adf.ly/XRjRH</a></p> Typing skills meter (Python) 2012-11-02T12:29:25-07:00Pierre Quentelhttp://code.activestate.com/recipes/users/1552957/http://code.activestate.com/recipes/578318-typing-skills-meter/ <p style="color: grey"> Python recipe 578318 by <a href="/recipes/users/1552957/">Pierre Quentel</a> (<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/typing/">typing</a>). </p> <p>A Tkinter-based program that shows your typing skills (speed and error rate) in the form of a car dashboard</p> <p>The text to type is displayed in a text zone, the cursor and the dashboard needles progress as you type the letters. Text can be copied-pasted, or loaded from a file that users can store in the subfolder "texts"</p> <p>The interface language can be configured (in this version, only French-English, but easily extendable to other languages)</p> processing (Python) 2012-01-09T02:23:35-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578004-processing/ <p style="color: grey"> Python recipe 578004 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/experiment/">experiment</a>, <a href="/recipes/tags/framework/">framework</a>, <a href="/recipes/tags/gui/">gui</a>). </p> <p>This module was inspired by <a href="http://processing.org/" rel="nofollow">http://processing.org/</a> . The code is meant to mimic an extremely small subset of this high-performance library. After seeing how easy it was to accomplish certain task in the Java framework, a desire was created to have a simple starting point to create little graphical experiments that would be easy to program without haveing to know a lot of details regarding setup, timing, et cetera. This is the result of that desire.</p> File Share Messenger 2.5 (Python) 2011-04-06T02:45:15-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577638-file-share-messenger-25/ <p style="color: grey"> Python recipe 577638 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/file_io/">file_io</a>, <a href="/recipes/tags/file_share/">file_share</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/messenger/">messenger</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/workaround/">workaround</a>). </p> <p>After writing the limited program shown in <a href="http://code.activestate.com/recipes/577637/">recipe 577637</a>, the following program was written with a better yet incompatible I/O system designed not to fill up a file share with many, separate files. This program had five revisions as outlined within the source code. To access settings within this program, use the "F2" key. Documentation may be accessed via the "F1" key (with future plans cut).</p> <p>If anyone wishes to comment or vote this recipe down, please provide your insight into the fault(s) of the program and provide a suggestion as to what solution you would implement to fix the problems.</p> edit dictionary values (possibly restrained) with Tkinter (Python) 2011-03-15T21:37:54-07:00s_h_a_i_ohttp://code.activestate.com/recipes/users/4177334/http://code.activestate.com/recipes/577611-edit-dictionary-values-possibly-restrained-with-tk/ <p style="color: grey"> Python recipe 577611 by <a href="/recipes/users/4177334/">s_h_a_i_o</a> (<a href="/recipes/tags/edit/">edit</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/in/">in</a>, <a href="/recipes/tags/options/">options</a>). </p> <p>The behaviour of applications sometimes depends on various parameters that can be chosen by the user through some GUI. Quite often, these parameters need take value in a predefined set. Parameters include for instance:</p> <ul> <li>The number of replications for a simulator.</li> <li>Dates of beginning/end of sample for time series access/plot.</li> <li>Log writing</li> </ul> <p>This recipe assumes that</p> <ul> <li>Such parameters are stored in a dictionary. Values in the dictionnary are used as initial values for the parameters.</li> <li>Values are "singleton", i.e non iterable (although they may be strings).</li> <li>When a value is a list instance, its content represent the set of possible values The recipe offers a simple way to edit the values in a Tkinter Frame, by adding proper widget to it (constrained value are menubutton while unconstrained values are edit widgets).</li> </ul> <p>This is done by the function apply(frame,dict,position), which adds to the Tkinter frame the necessary widgets to edit the dictionary dict. Widgets are placed using grid (hence the frame needs use grid() too) and span on two columns. topleft position (x,y) in grid is specified using position= (x,y,0,0)</p> File Share Messenger 1.0 (Python) 2011-04-06T00:03:20-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577637-file-share-messenger-10/ <p style="color: grey"> Python recipe 577637 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/file_io/">file_io</a>, <a href="/recipes/tags/file_share/">file_share</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/messenger/">messenger</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/workaround/">workaround</a>). </p> <p>File I/O has many potential uses, and in the case of network file shares, messaging can be conducted by creating files in a directory and scanning for new files to find new messages. In the case where there are restrictions within a network that prevent opening server sockets or creating and using client sockets, the technique in this recipe may be used with file shares instead. The program is simple and was written in about fifty minutes, so there are a great deal of enhancements that could be made to the recipe and its capabilities. Hopefully, this will provide inspiration for other program writers.</p> <p>If you have any comments or wish to down-vote this recipe, please provide your insight as to what could be improved upon and how you would go about fixing any problems that you might find.</p> Color Study 1 (Python) 2011-04-05T23:35:32-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577636-color-study-1/ <p style="color: grey"> Python recipe 577636 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/example/">example</a>, <a href="/recipes/tags/experiment/">experiment</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/sandbox/">sandbox</a>). </p> <p>The following program was written to understand how two different color systems related to each other, RGB and HSV. The recipe could be better written and extended further to support other color systems in addition to the two it already uses, but it is a simple example of how one might go about to understand what others speak of when talking about color. The GUI is simple to use and responsive, and the code is a good demonstration of what may need to be written to produce a demonstration such as this one.</p> <p>If you have suggestions or would like to vote this recipe down, please provide an explanation of the problem along with a solution that you would propose and implement to improve upon what is presented.</p> Directory Size (GUI) (Python) 2011-02-09T13:47:54-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577567-directory-size-gui/ <p style="color: grey"> Python recipe 577567 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/application/">application</a>, <a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/sizeof/">sizeof</a>, <a href="/recipes/tags/tree/">tree</a>). Revision 2. </p> <p>Have you ever wanted to find out how much room a particular directory was taking up on your hard drive? A roommate of mine in college was having trouble keeping track of where his hard drive space is going, so the following program provided a solution that allows a brief overview of a directory's size along with all of its children. A tree view is created using tkinter and is populated with the directory's name, cumulative size, immediate total file size, and full path. The search button is disabled during a search, and the directory listing with its children is automatically updated.</p> Quiz Me 2.5 (main) (Python) 2011-01-09T21:14:04-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577525-quiz-me-25-main/ <p style="color: grey"> Python recipe 577525 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/quiz/">quiz</a>). Revision 2. </p> <p>Before discovering <a href="http://quizlet.com/" rel="nofollow">http://quizlet.com/</a>, the following program was developed for running custom quizzes to help with studying for college courses. The program is not very advanced, but it works reasonably well for what it was designed to do. If the program were developed further, it would need greater capabilities than it currently has and would require a secondary system for actually creating the quizzes (currently, they are hand-typed). Quiz Me could be a starting point for anyone who wishes to actually write a program such as this and inspire others to write much better programs than what this recipe currently offers.</p> <p>This is the main entry point to the Quiz Me program. It creates the GUI context and sets the program up for automatic error logging. Experimental threading support is provided but unused in the program. Since the main application subclasses a frame, it can easily be embedded in another application without much difficulty. Quiz Me is entirely event based and has an event runner in the very last method shown here.</p> Quiz Me 2.5 (XML example) (Python) 2011-01-11T00:51:24-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577541-quiz-me-25-xml-example/ <p style="color: grey"> Python recipe 577541 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/quiz/">quiz</a>). Revision 2. </p> <p>Before discovering <a href="http://quizlet.com/" rel="nofollow">http://quizlet.com/</a>, the following program was developed for running custom quizzes to help with studying for college courses. The program is not very advanced, but it works reasonably well for what it was designed to do. If the program were developed further, it would need greater capabilities than it currently has and would require a secondary system for actually creating the quizzes (currently, they are hand-typed). Quiz Me could be a starting point for anyone who wishes to actually write a program such as this and inspire others to write much better programs than what this recipe currently offers.</p> <p>This is an example testbank file for Quiz Me. The questions and answers were created from a book used in a "HI 101" college class. What is presented here is a small sample of what would more likely be a much larger bank of question and answers used for automated quizzing or testing purposes. The XML shown here is formatted correctly dictated by an unwritten specification that the testbank (parsing) module requires. It is the quizcore module that takes the data through its final transformation and also builds questions and answers based on the material available. Once the .build() method has been called on classes inheriting from the _Category class, public attributes (QnA) become available on the _Category objects containing enough information for asking questions with provided answers. Fact objects also have .build() methods; once called, public Q2A and A2Q attributes can be used to find valid mappings of questions to answers and answers to questions.</p>