[Tutor] Printing txt files in landscape from python

Tim Golden mail at timgolden.me.uk
Thu Feb 1 18:13:20 CET 2007

> Hi All,
> do you have any idea, how I can send a txt file to the default printer in
> landscape view with python on windows.
> I wanted to set up just the char size and the orientation of the printout.
> thinking about
>         os.system('notepad.exe /pt "%%%s"' % filename)

Doesn't completely answer your question, but
have a look at this:


and perhaps consider a ReportLab solution. It's ridiculously
difficult to set up the printing params construct under
Windows (just search for DEVMODE) so might well be easier
to use a PDF approach.


More information about the Tutor mailing list