Today on StackOverflow I saw someone who wanted to know how to drag a file from a wx.ListCtrl onto their Desktop or somewhere else in the file system. They were using the file manager skeleton from zetcode, but couldn't figure out how to add the DnD portion. After a bit of searching and hacking, I […]
Every now and then you'll find yourself needing to load modules or classes dynamically. In other words, you'll want to be able to import a module without knowing ahead of time which one you're going to import. In this article, we'll look at two ways to accomplish this feat in Python. Using the __import__ Magic […]
List comprehensions in Python are very handy. They can also be a little hard to understand when and why you would use them. List comprehensions tend to be harder to read than just using a simple for loop as well. We'll spend some time looking at how to construct list comprehensions and learn how they […]
Today we're going to take a look at Tkinter! I was curious about how one would go about hiding a frame and then re-showing it using Tkinter and I kept finding threads (like this one) that talked about using withdraw() and deiconify() but didn't really provide any usable code. In wxPython, I did this sort […]
Today on StackOverflow I saw someone wondering how to bind two functions / methods to the same event in wxPython. It's really quite easy. Here's one example:
Mercurial is a free, distributed source control versioning tool, similar to git or bazaar. Some might even compare it CVS or Subversion (SVN), although those are not distributed versioning systems. The Python programming core development team chose to switch to Mercurial from SVN a couple years ago and many other high profile 3rd party Python […]