What's the most popular language of 2013? According to CodeEval.com, it's Python! If you compare that with TIOBE, Python is only at #8, but at least it's still in the top ten! Hopefully Python will continue to gain in the ranks and be used in many new places in 2014. You might also find the […]
One of my friends on the wxPython Google Group asked how to catch any exception that happens in wxPython. The problem is complicated somewhat because wxPython is a wrapper on top of a C++ library (wxWidgets). You can read about the issue on the wxPython wiki. Several wxPython users mentioned using Python's sys.excepthook to catch […]
Sometimes when you are coding, you want to know how long it takes for a particular function to run. This topic is known as profiling or performance tuning. Python has a couple of profilers built into its Standard Library, but for small pieces of code, it's easier to just use Python's timeit module. Thus, timeit […]
I've been thinking about creating a simple downloading script with wxPython for quite a while. Then I saw someone on StackOverflow asking about how to do it and I decided it was time to figure it out. Downloading a file with Python is trivial. I wrote about a couple of different ways to do that […]
A few years ago, a fellow named Zed Shaw created a website called Learn Python the Hard Way that a lot of people praised. The website is made up of lots of short exercises that help beginner programmers learn the various nuances of Python but in bit-sized chunks. He kept updating it from time to […]
The topic of generators has been covered numerous times before. However, it's still a topic that a lot of new programmers have trouble with and I would hazard a guess that even experienced users don't really use them either. Python generators allow developers to lazily evaluate data. This is very helpful when you are dealing […]