Archive for October, 2010

If you’re new to wxPython but not new to XML, you might find this article useful to you. Why? Because wxPython supports XRC, an XML file format that describes the GUI in XML, duh. In fact, wxPython’s Documentation & Demos package includes an editor just for creating and manipulating these files that is called, XRCed. This article will take you on a journey to see XRCed’s features and general usage. (more…)

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 to input their name and initials during the first run of that respective application and it will keep that data no matter who logs into the machine later on. This can lead to some serious confusion when we get error messages of this sort. Anyway, let’s take a quick look at how to get this done. (more…)

One of my first self-imposed projects at my job was to recreate a certain annoying application that was a Frankenstein monster: a Microsoft Access file with a VBA GUI. For the most part, the application didn’t even have a database. Anyway, part of the application allowed the user to type in an amount for a check and the VBA code would magically translate the numbers into the text you would normally write on a check. For example, let’s say I wrote a check for $1,234.56. It would translate that to “one thousand two hundred thirty four dollars and fifty six cents”. I needed a way to do the same thing in Python! (more…)

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 learn what I discovered. (more…)

I’ve been working on an article about the various Python projects that took part in the 2010 Google Summer of Code for over a month. There are a lot of projects and people to contact and I would say of the ones that I did contact, only 50-60% responded back. So I’m going to go with what I’ve got now and if you’d like to have me highlight your project too, then you can contact me and I’ll do so. It should be noted that a similar article will be posted on the Python Software Foundation blog as well, that I also wrote. (more…)

Just an FYI for those of you who like this blog. I have recently opened a Mouse Vs. the Python Twitter account to make it even easier to follow updates to this blog. You can find it here:

http://twitter.com/mousevspython

I am experimenting with WordPress plugins that can auto-post to Twitter, but haven’t had much luck finding any that work that well. If you have any good suggestions, let me know. Thanks!

The wxPython project is one of the most popular and easy to use Python GUI toolkit. It wraps the popular C++ wxWidgets project using SWIG. It is also the only cross-platform toolkit that I am aware of that uses the native widgets on each platform wherever possible (for better or for worse). Some like to say that PyQt does this as well, but from what I’ve read, PyQt actually draws all its controls to mimic the native controls, it doesn’t actually use them. Anyway, that’s neither here nor there. The topic is the wxPython Demo. There are lots of people who do not know that this demo even exists.

The wxPython Demo is an extra download from wxPython’s main website. It has a runnable example of nearly every widget included with wxPython. In this article, we’ll take a quick look at what this demo can do. (more…)

Whether you’re new to Python, been using it for a few years or you’re an expert, knowing how to use Python’s introspection capabilities can help your understanding of your code and that new package you just downloaded with the crappy documentation. Introspection is a fancy word that means to observe oneself and ponder one’s thoughts, senses, and desires. In Python world, introspection is actually kind of similar. Introspection in this case is to use Python to figure out Python. In this article, you can learn how to use Python to give yourself a clue about the code you’re working on or trying to learn. Some might even call it a form of debugging. (more…)

Update (10/12/2010) – One of my alert readers told me that SqlAlchemy 0.6.x currently does NOT support the Access dialect. Read here for more info.

A year or two ago, I was asked to transfer some data from some old Microsoft Access files to our Microsoft SQL Server. Since I enjoy using SqlAlchemy, I decided to see if it supported Access. The documentation at the time was pretty unhelpful in this regard, but it did seem to be possible and I found one thread about it on SqlAlchemy’s Google group. (more…)

Python Multimedia Application Beginner’s Guide

By Ninad Sathaye

Amazon

Packt

(more…)