When you're first starting out as a Python programmer, you don't think about how you might need to install an external package or module. But when that need appears, you'll want to know how to in a hurry! Python packages can be found all over the internet. Most of the popular ones can be found […]
The lxml.objectify sub-package is extremely handy for parsing and creating XML. In this article, we will show how to create XML using the lxml package. We'll start with some simple XML and then try to replicate it. Let's get started!
There are a couple of ways to create Microsoft Excel spreadsheets with Python. You can use PyWin32's win32com.client method, which was discussed in an old article a number of years ago or you could use the xlwt package. We'll be looking at the latter in this article. You will learn how to create an Excel […]
The Python 101 book campaign finished today. I am now well funded to create the book and get all the artwork done. I think I may try to get additional illustrations too. While we didn't hit the next stretch goal, I plan to go ahead and work on screencasts anyway. As I mentioned previously, I […]
Code profiling is an attempt to find bottlenecks in your code. Profiling is supposed to find what parts of your code take the longest. Once you know that, then you can look at those pieces of your code and try to find ways to optimize it. Python comes with three profilers built in: cProfile, profile […]
Python comes with its own debugger module that is named pdb. This module provides an interactive source code debugger for your Python programs. You can set breakpoints, step through your code, inspect stack frames and more. We will look at the following aspects of the module: How to start the debugger Stepping through your code […]