print from a python script.

Ronn Ross ronn.ross at gmail.com
Mon Apr 6 17:24:08 EDT 2009


I'm trying to print a simple string to a network printer. This is what I
have so far:

import os

printer_path = "192.168.200.139"
p = os.popen(printer_path, 'w')
p.write("this is a printer test")
p.close()

I'm trying to call the printer from its IP address. When I run the script I
get:
sh: 192.168.200.139: not found

thanks for you help in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090406/1824b76a/attachment.html>


More information about the Python-list mailing list