HELP Printing with wxPython
jeff elkins
jeffelkins at earthlink.net
Wed May 11 23:11:57 EDT 2005
On Thursday 12 May 2005 04:56 am, Mike Meyer wrote:
> James Carroll <mrmaple at gmail.com> writes:
> > If you are doing this just for yourself, and you know you have a
> > printer that will really print just the plain text when you send it
> > plain text (like a dot matrix printer from the early 90s) then you can
> > probably open the printer device and send it text. Under windows you
> > can try opening LPT1 or on unix it's probably /dev/lpr or something
> > like that.
>
> Under Unix, you shouldn't be able to open the line printer, whether
> it's /dev/lpr or /dev/lpt0 or whater. You shouldn't have
> permission.
>
> Instead, as was suggested earlier, use the "lpr" command and send it
> the text/data on standard input. Any reasonably managed Unix system
> should be able to handle a fair range of graphics formats, though
> postscript is preferred.
>
> <mike
> --
> Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
> Independent WWW/Perforce/FreeBSD/Unix consultant, email for more
> information.
I've been using:
p=os.popen('lp','w')
p.write("some text')
p.Close()
Jeff
More information about the Python-list
mailing list