Python

Generating a Dialog from a File

A few days ago, I wrote an article about using ConfigObj with wxPython. The first question I was asked about the article regarded using a configuration file to generate the dialog. I thought this was an interesting idea, so I took a stab at implementing that functionality. Personally I think it would be probably be …

Generating a Dialog from a File Read More »

A Brief ConfigObj Tutorial

Python comes with a handy module called ConfigParser. It’s good for creating and reading configuration files (aka INI files). However, Michael Foord (author of IronPython in Action) and Nicola Larosa decided to write their own configuration module called ConfigObj. In many ways, it is an improvement over the standard library’s module. When I first looked …

A Brief ConfigObj Tutorial Read More »

Shortening URLS with wxPython

During the summer, I stumbled upon an article on Ars Technica about using PyGTK to create a URL shortener. I thought that was pretty interesting, but I don’t use PyGTK. So at that point, I decided to write my own using wxPython and use the article’s code to do the shortening. I hacked together something …

Shortening URLS with wxPython Read More »

Using Multiple Databases in TurboGears 2

Last week, I embarked on an adventure into the world of web application programming. Since my work place uses Python as much as possible and my boss likes TurboGears, I chose it for this endeavor. I have worked through various TurboGears tutorials and thought it looked pretty cool. However, it doesn’t take long to discover …

Using Multiple Databases in TurboGears 2 Read More »

Book Review: Django 1.0 Web Site Development

I received Ayman Hourieh’s Django 1.0 Web Site Development from Packt Publishers a few weeks ago for review. I had worked with Django before when I went through another book on Python web frameworks as well as one of their official tutorials. I had my doubts about this book because it was only 257 pages …

Book Review: Django 1.0 Web Site Development Read More »

wxPython – Redirecting stdout / stderr

New programmers start using Python and wxPython each week. So it follows that every few months, I see people asking how to redirect stdout to a wx.TextCtrl on comp.lang.python or the wxPython mailing list. Since this is such a common question, I thought I would write an article about it. Regular readers will know that …

wxPython – Redirecting stdout / stderr Read More »

wxPython Sizers Tutorial: Using a GridBagSizer

In this tutorial, I will take my code from the GridSizer tutorial I wrote the other day and heavily modify it to display oddly shaped widgets in a GridBagSizer. The GridBagSizer is the most complex of the sizers. It subclasses the FlexGridSizer, so you can use all of it’s parent’s methods as well as those …

wxPython Sizers Tutorial: Using a GridBagSizer Read More »