<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; I'm an intermediate python prgrammer -- I 
do things like command apps for simple tasks like creatings zip files, copying 
files, computing things like area, etc. Also, I have used VPython to create a 
function graphing program, etc. Ugh, enough about me ----&nbsp; I would like to 
know if there is a way in Python to send a string to a printer on a parallel 
port or usb port. I do have one idea, but it's messy.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Ex. -- </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>import os</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>ask = raw_input('What string do you want to print? 
')</FONT></DIV>
<DIV><FONT size=2>filetoprint = open( 'Temp.txt ' ,'w' )</FONT></DIV>
<DIV><FONT size=2>filetoprint.write( ask )</FONT></DIV>
<DIV><FONT size=2>filetoprint.close()</FONT></DIV>
<DIV><FONT size=2>batch = open( 'print.bat','w' )</FONT></DIV>
<DIV><FONT size=2>batch.write( 'Temp.txt &gt; LPT1' )</FONT></DIV>
<DIV><FONT size=2>batch.close()</FONT></DIV>
<DIV><FONT size=2>os.startfile( 'print.bat' )</FONT></DIV>
<DIV><FONT size=2>os.remove( 'Temp.txt' )</FONT></DIV>
<DIV><FONT size=2>os.remove( 'print.bat' )</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>## End example</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Soo, I was wondering if there was a way to print directly -- 
without writing the batch file, etc.</FONT></DIV>
<DIV><FONT size=2>Thanks...</FONT></DIV></BODY></HTML>