Printing from python on Windows platform

Johann Spies jhspies at futurenet.co.za
Sat Jul 31 14:14:03 EDT 1999


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')
    drukker.write(drukstuk)
    sys.stdout.write(drukstuk)

What would the windows equivalent be?

Johann

 --------------------------------------------------------------------------
| Johann Spies                                 Windsorlaan 19              |
| jhspies at futurenet.co.za                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