Cross-Platform

This article will be about a topic that can be used across platforms, such as Linux, Windows and Mac.

Python Concurrency: Porting from a Queue to Multiprocessing

Earlier this week, I wrote a simple post about Python’s Queues and demonstrated how they can be used with a threading pool to download a set of PDFs from the United States Internal Revenue Service’s website. Today I decided to try “porting” that code over to Python’s multiprocessing module. As one of my readers pointed […]

Python Concurrency: Porting from a Queue to Multiprocessing Read More »

Python 101: An Intro to logging

Python provides a very powerful logging library in its standard library. A lot of programmers use print statements for debugging (myself included), but you can also use logging to do this. It’s actually cleaner to use logging as you won’t have to go through all your code to remove the print statements. In this tutorial

Python 101: An Intro to logging Read More »

Python: A Simple Step-by-Step SQLite Tutorial

SQLite is a self-contained, server-less, config-free transactional SQL database engine. Python gained the sqlite3 module all the way back in version 2.5 which means that you can create SQLite database with any current Python without downloading any additional dependencies. Mozilla uses SQLite databases for its popular Firefox browser to store bookmarks and other various pieces

Python: A Simple Step-by-Step SQLite Tutorial Read More »

wxPython: Creating Your Own Cross Platform Process Monitor with psutil

This week, I came across a fun Python project named psutil on Google Code. It says it works on Linux, Windows, OSX and FreeBSD. What it does is grab all the running processes and gives you information on them and also gives you the ability to terminate them. So I thought it would be fun

wxPython: Creating Your Own Cross Platform Process Monitor with psutil 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 »

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 »

ANN: MediaLocker – A wxPython App to Track Your Media

Background ================ This is the first release of a real project that I’ve been involved in. I had written an article last month that inspired Werner Bruhin to want to take it and make it into a demonstration program for new wxPython programmers in how to do MVC and CRUD while interfacing with a database.

ANN: MediaLocker – A wxPython App to Track Your Media Read More »

TurboGears 2: Setting up on Windows

TurboGears is one of several web frameworks for Python that are available. The most popular by far is Django. Where I work, we chose TurboGears because of its integration with SQLAlchemy which supports composite keys. At that time, Django did not support that feature and I am not sure if it does yet. Anyway, I

TurboGears 2: Setting up on Windows Read More »