Python

Python 101: Introspection

Whether you’re new to Python, been using it for a few years or you’re an expert, knowing how to use Python’s introspection capabilities can help your understanding of your code and that new package you just downloaded with the crappy documentation. Introspection is a fancy word that means to observe oneself and ponder one’s thoughts, […]

Python 101: Introspection Read More »

How to Find and List All Running Processes with Python

The other day, I was tasked with finding a way to get a list of all running processes on a Windows XP virtual machine. I was also supposed to include information about how much CPU and memory each process used. Fortunately, this didn’t have to be a remote script, but one that could be run

How to Find and List All Running Processes with Python Read More »

Book Preview: Python Graphics Cookbook

This week, I finished editing another book for Packt Publishing. The book’s name is Python Graphics Cookbook by Mike Ohlson de Fine (I think). You may wonder why I don’t know if de Fine is the author. Well, Packt thinks that its Technical Editors shouldn’t know that information. In fact, Packt is so cagey (and

Book Preview: Python Graphics Cookbook Read More »

Reportlab Tables – Creating Tables in PDFs with Python

Back in March of this year, I wrote a simple tutorial on Reportlab, a handy 3rd party Python package that allows the developer to create PDFs programmatically. Recently, I received a request to cover how to do tables in Reportlab. Since my Reportlab article is so popular, I figured it was probably worth the trouble

Reportlab Tables – Creating Tables in PDFs with Python Read More »

SqlAlchemy: Connecting to pre-existing databases

Accessing databases with Python is a simple process. Python even provides a sqlite database library that’s built into the main distribution (since 2.5). My favorite way to access databases with Python is to use the 3rd party package, SqlAlchemy. SqlAlchemy is an object-relational mapper (ORM), which means that it takes SQL constructs and makes them

SqlAlchemy: Connecting to pre-existing databases Read More »

Another GUI2Exe Tutorial – Build a Binary Series!

This is the last article of my “Build a Binary Series”. If you haven’t done so already, be sure to check out the others. For our finale, we are to look at Andrea Gavana’s wxPython-based GUI2Exe, a nice graphical user interface to py2exe, bbfreeze, cx_Freeze, PyInstaller and py2app. The latest release of GUI2Exe is 0.5.0,

Another GUI2Exe Tutorial – Build a Binary Series! Read More »

A bbfreeze Tutorial – Build a Binary Series!

The bbfreeze package also allows us to create binaries, but only on Linux and Windows. It’s just an easy_install away, so if you plan on following along with the examples in the article, you should go get it. The bbfreeze package includes egg support, so it can include egg dependencies in your binary, unlike py2exe.

A bbfreeze Tutorial – Build a Binary Series! Read More »

Book Review: Practical Programming: An Introduction to Computer Science Using Python

Practical Programming: An Introduction to Computer Science Using Python By Jennifer Campbell, Paul Gries, Jason Montojo and Greg Wilson Amazon I received the book, Practical Programming: An Introduction to Computer Science Using Python as a gift last month from a family member. This book is by four authors: Jennifer Campbell, Paul Gries, Jason Montojo and

Book Review: Practical Programming: An Introduction to Computer Science Using Python Read More »

A PyInstaller Tutorial – Build a Binary Series!

In our previous article on building binaries, we learned a little about py2exe. This time around, we will be focusing our collective attention on the ins and outs of PyInstaller. We’ll use the same lame wxPython script from the last article for one of our examples, but we’ll also try a normal console script to

A PyInstaller Tutorial – Build a Binary Series! Read More »