Python can do a lot of things

But it is not omnipotent. Leave that to Q. I stumbled upon this funny answer from back in 2005 and I had to share it. That guy is a genius! ;-)

I’m curious how I can make Python print text in color.

That depends strictly on your printer. With my hp LaserJet 1200, no way — not even Python’s power can overcome the hardware’s limitations in this regard… it’s a black-and-white printer and that’s all there is to it! If I did have a color printer, then I would have Python produce the appropriate postscript code, or “escape-sequences” in whatever printer-specific language a given printer requires to have it output color text (or, depending on my operating system, printer driver, filters, etc, I might have to send appropriate “escape-sequences” or whatever to the DRIVER in order to convince it to drive the printer appropriately).

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>