Python and Printing

Ben Hutchings ben.hutchings at roundpoint.com
Wed Mar 7 00:59:23 CET 2001


Mix <mix77 at usa.net> writes:

> I have pictures (JPEG) which I get from a database and dump in an
> arbitrary directory.
> To print a picture I do the following:
> 
>       import os
>       os.system("lpr lena.jpg")
> 
> 
> My problem is that page orientation is always"landscape" instead
> "portatrait".  What switch is there to specify orientation for "lpr"
> if any?

Is 'lpr' part of Python?  No?  Then this isn't really a Python
question.

> P.S. I'm working under linux (redhat 7.0 distribution ).

So try asking in a Linux or Unix newsgroup such as
comp.os.linux.questions or comp.os.linux.redhat.  Or even searching
those groups first.

I think you're out of luck, actually.  You probably need to set up
separate printer queues for portrait and landscape documents.

-- 
Any opinions expressed are my own and not necessarily those of Roundpoint.



More information about the Python-list mailing list