Python Color Printing

Peter Hansen peter at engcorp.com
Thu Jun 24 08:22:49 EDT 2004


Kamilche wrote:

> I'm pretty desperate to get color syntax printing. I just tried out
> the evaluation version of 'Komodo', which several people in here
> suggested, and its print features are terrible. The text is coming out
> huge when I print at 8 point, tiny when I'm printing at 14 point (so
> tiny that it looks like subscripts), the margins are reset at random,
> and so on. Plus it doesn't recognize all my fonts.
> 
> I don't care if the pretty printer is in an IDE. I just want color
> printing with headers and footers! And I wanted it automated - I don't
> want to have to print each one by hand, I want to start them all
> printing and walk away. It has to be able to print in larger fonts
> reliably, because 10 point is too small for my computer-weary eyes.
> 
> Does anyone have any suggestions?

I generally look to PDF first for all my printing needs.  In this
case, I'd use ReportLab and whatever conveniently syntax-colouring
script I stumbled over.

Automating the printing is probably simple enough from the command
line (i.e. os.system()), though I don't know the incantation, but
I'm sure it could also be automated fairly easily through the
Acrobat COM interface, assuming you're on Windows.  On Linux I
am sure there are equivalent (and likely better :-) solutions.

-Peter



More information about the Python-list mailing list