Printing from python on Windows platform

Johann Spies jhspies at
Tue Aug 3 23:26:00 CEST 1999

I am sorry to ask this a second time, but I did not receive any hint 
after the first time I put this question to the list. 

I am a Linux user writing a program for somebody that will use it on a
Windows platform.  In Linux I use the following to redirect printing to
the printer:

    drukker = sys.stdout
    drukker = os.popen('lpr','w')

What would the windows equivalent be?

I have tried os.popen('prn', 'w'), but without success.  I cannot see
anything in the python documentation to help me. 


| Johann Spies                                 Windsorlaan 19              |
| jhspies at                3201 Pietermaritzburg             |
| Tel/Faks Nr. +27 331-46-1310		       Suid-Afrika (South Africa)  |

     "Have not I commanded thee? Be strong and of a good 
      courage; be not afraid, neither be thou dismayed; for 
      the LORD thy God is with thee whithersoever thou 
      goest."                        Joshua 1:9 

More information about the Python-list mailing list