Archive for April, 2010

While working on my Python mp3 player I realized I needed to research what Python had to offer for parsing ID3 tags. There are tons of projects out there, but most of them appear to be either dead, don’t have documentation or both. In this post, you will discover the wild world of MP3 tag parsing in Python along with me and we’ll see if we can find something that I can use to enhance my mp3 player project. (more…)

Last month, I started a series of articles on creating simple applications with wxPython. The first couple of articles were on an Image Viewer program. While I won’t abandon that project, I thought it was time for us to delve into something new. In this article we will start a journey into the wild and woolly world of playing MP3s. We will create a very simple interface that we can use to play, pause and stop a song with. We will also learn how to seek within a track and change the volume of the music. In future articles, we will add a display with music information (like title, artist, genre, etc), track lists, a random function, and more. Let’s get started! (more…)

Have you ever thought that it would be cool to have your wxPython code take a screenshot of itself? Well, Andrea Gavana figured out a cool way to do just that and between what he told us on the wxPython mailing list and what I learned from other sources, you will soon learn how to not only take the screenshot, but how to send it to your printer! (more…)

The other day, we created a simple image viewer. Today we will create a secondary dialog to display the image’s EXIF data, if it has any. We will make it in such a way that this window will update as we change pictures using the cool pubsub module. We will use the version that is included in wxPython for this application, but feel free to use the stand-alone version as well. (more…)

Last month I mentioned that we would go on a journey to learn some tips and tricks for wxPython’s Grid widget. Well, the coding is done and I thought it was time to actually do this thing. In the following article you will learn how to:

  • Create a right-click pop-up menu in a cell
  • Put tooltips on the Row and Column labels and on the cells
  • How to use your keyboards arrow keys to move out of a cell that’s being edited
  • Hide Row/Column labels/headers
  • Show a pop-up when clicking a row label
  • Change row/column labels

Well, what are you waiting for? Click the “more” link and start reading! (more…)

Soon after getting hired at my current job, my boss sent me a script (which I think was based on this article) about Python and a certain text-to-speech module called pyTTS. This was right after Python 2.5 had released. Anyway, it’s basically a nice wrapper over the win32com module which can communicate with the Microsoft Speech API (SAPI). (more…)