batch pretty (color) print of python code?
p at ulmcnett.com
Mon Sep 27 22:32:48 CEST 2004
> Any freeware/open-source that does that? Windows- OR
> Linux-based is fine. On Linux it would be s/t like "pyprint
> -r *.py > out.ps" 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 py2pdf.py, 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 py2pdf.py *.py
results in a .pdf file for every .py file in the directory.
Independent Software Consultant
More information about the Python-list