June 2012

Reportlab: Mixing Fixed Content and Flowables

Recently I needed the ability to use Reportlab’s flowables, but place them in fixed locations. Some of you are probably wondering why I would want to do that. The nice thing about flowables, like the Paragraph, is that they’re easily styled. If I could bold something or center something AND put it in a fixed […]

Reportlab: Mixing Fixed Content and Flowables Read More »

An Intro to rst2pdf – Changing Restructured Text into PDFs with Python

There are several cool ways to create PDFs with Python. In this article we will be focusing on a cool little tool called rst2pdf, which takes a text file that contains Restructured Text and converts it to a PDF. The rst2pdf package requires Reportlab to function. This won’t be a tutorial on Restructured Text, although

An Intro to rst2pdf – Changing Restructured Text into PDFs with Python Read More »

pyflakes – the passive checker of Python programs

There are several code analysis tools for Python. The most well known is pylint. Then there’s pychecker and now we’re moving on to pyflakes. The pyflakes project is a part of something known as the Divmod Project. Pyflakes doesn’t actually execute the code it checks, unlike pychecker. Of course, pylint also doesn’t execute the code.

pyflakes – the passive checker of Python programs Read More »

Parsing XML with Python using lxml.objectify

A couple years ago I started a series of articles on XML parsing. I covered lxml’s etree and Python’s included minidom XML parsing library. For whatever reason I didn’t notice lxml’s objectify sub-package, but I saw it recently and decided I should check it out. To my mind, the objectify module seems to be even

Parsing XML with Python using lxml.objectify Read More »

wxPython and SQLAlchemy: Loading Random SQLite Databases for Viewing

I was recently contacted about whether or not there were any wxPython applications out here that could present a SQLite database. As I understood it, they wanted to be able to introspect the database and view the tables, probably using the wx.grid.Grid widget. I find the Grid widget to be very powerful and also rather

wxPython and SQLAlchemy: Loading Random SQLite Databases for Viewing Read More »

How to Convert Decimal Numbers to Words with Python

It may have been a better idea to have called this this article “How to Convert Floats to Words”, but since I’m talking about currency, I thought using Decimal was more accurate. Anyway, a couple years ago, I wrote about how to convert numbers to Python. The main reason I’m revisiting this topic is because

How to Convert Decimal Numbers to Words with Python Read More »