batch pretty (color) print of python code?

Paul McNett p at
Mon Sep 27 22:32:48 CEST 2004

Humpdydum writes:

> Any freeware/open-source that does that? Windows- OR
> Linux-based is fine. On Linux it would be s/t like "pyprint
> -r *.py >" where -r indicates recursive. Done a search
> on google and nothing solid comes up. So far I've been using
> Boa's print feature, which means one file at a time, tedious.

I believe you are looking for, the most recent version 
that I can find being included in ReportLab, in the tools 

It is very configurable, and the defaults are nice. It doesn't 
offer recursion or output redirection like you want, but you 
could probably take the code and run with it. What it will do 
out of the box is to convert your specified files to individual 
pdf files. For example:

python *.py

results in a .pdf file for every .py file in the directory.

Paul McNett
Independent Software Consultant

More information about the Python-list mailing list