Popular recipes tagged "meta:requires=gettext"http://code.activestate.com/recipes/tags/meta:requires=gettext/2013-09-29T19:25:23-07:00ActiveState Code RecipesA 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>
Progress Bar form WX in Child Thread of Main Python Code. (Python)
2006-04-14T09:30:59-07:00cheeng shu chinhttp://code.activestate.com/recipes/users/163970/http://code.activestate.com/recipes/491258-progress-bar-form-wx-in-child-thread-of-main-pytho/
<p style="color: grey">
Python
recipe 491258
by <a href="/recipes/users/163970/">cheeng shu chin</a>
(<a href="/recipes/tags/threads/">threads</a>).
Revision 2.
</p>
<p>I come across some cases, where I need to hook a progress bar from WX to my current running python project/script to indicate the current process progress.
Some how if you use MainLoop() in child thread will cause the WX session hang and EVT handle will failed.
After some study, found that WXAPP class instance and MainLoop have to same namespace.
I manage to redesign it and make it work now.
Just mail/vote me, if you feel this is useful for your project.
E-Mail : <a href="mailto:cheengshuchin@gmail.com">cheengshuchin@gmail.com</a></p>
Twisted / BitTorrent :: Client / Server (Python)
2005-10-30T01:24:39-07:00Jonathan Kolyerhttp://code.activestate.com/recipes/users/452108/http://code.activestate.com/recipes/440555-twisted-bittorrent-client-server/
<p style="color: grey">
Python
recipe 440555
by <a href="/recipes/users/452108/">Jonathan Kolyer</a>
(<a href="/recipes/tags/programs/">programs</a>).
Revision 3.
</p>
<p>Two modules that run a BitTorrent server, and uses Twisted as a client to coordinate control-message passing, and progress monitoring. The server can be run as a separate process, or as a thread within the client -- the same messages can be passed back and forth.</p>
<p>Control messages can cancel individual downloads (or the whole process), as well as pause downloading. Progress queries can be invoked through the client, which will ping the server, and report back each downloads' progress.</p>