February 11, 2014 by
Mike Python's logging module has lots of options. In this article, we will looks at the logging module's ability to create Rotating Logs. Python supports two types of rotating logs: Rotate logs based on size (RotatingFileHandler) Rotate the logs based on some time interval (TimedRotatingFileHandler) Let's spend some time learning how each of these two types […]
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 […]