wxPython: Storing Objects in ComboBox or ListBox Widgets

Earlier this week, there was a discussion on the wxPython IRC channel about how to store objects in wx.ListBox. Then later on that day, there was a question on StackOverflow about the same thing, but in relation to the wx.ComboBox. Fortunately, both of these widgets inherit from wx.ItemContainer and contain the Append method, which allows

wxPython: Storing Objects in ComboBox or ListBox Widgets Read More »

wxPython: Keyboard Shortcuts (Accelerators)

Almost any computer power user will want to use keyboard shortcuts (AKA: accelerators) to get their work done. Fortunately for us, wxPython provides a way to accomplish this very easily using an Accelerator Table via the wx.AcceleratorTable class. In this article we will look at a couple examples to see how this is accomplished.

wxPython: Keyboard Shortcuts (Accelerators) Read More »

Python: Parsing XML with lxml

Last time, we looked at one of Python’s built-in XML parsers. In this article, we will look at the fun third-party package, lxml from codespeak. It uses the ElementTree API, among other things. The lxml package has XPath and XSLT support, includes an API for SAX and a C-level API for compatibility with C/Pyrex modules.

Python: Parsing XML with lxml Read More »

Python: Changing Microsoft Office User Initials

A couple of months ago at work, we received a report that a file was locked. The dialog that appeared showed the initials of a user who wasn’t even working for us any more. Thus we discovered an annoying bug that can crop up with Office. Basically, a user is asked by Word or Excel

Python: Changing Microsoft Office User Initials Read More »

Downloading Encrypted and Compressed Files with Python

Earlier this year, I was tasked with creating an application that would download information from our organization’s website using Python. The tricky part was that it would be encrypted, gzipped and the payload would be JSON. Could Python do all that? Well, that’s what I wanted to find out. Now it’s time for you to

Downloading Encrypted and Compressed Files with Python Read More »