[Tutor] Python printing to LPT

Bill Allen wallenpb at gmail.com
Sun Feb 13 04:08:55 CET 2011


As a followup, I have done some more searching and found some terrific
information on this subject of Python printing on the Windows platform.
The following link shows variations using some modules from the pywin32
package.

http://timgolden.me.uk/python/win32_how_do_i/print.html



--Bill






On Sat, Feb 12, 2011 at 15:34, ALAN GAULD <alan.gauld at btinternet.com> wrote:

> > to print some plain text to a dot matrix printer that the printer can
> handle
> > with its own internal fonts without need for any kind of other
> processing.
>
> In that case you can either open LPT1 as a file and write to it or use
> redirection to PRN from the command line.
>
>
> > I am dubious about the reliability of using the MS Windows "DOS" in
> > a production environment.
>
> We used DOS in production environments for 10 years before Windows
> took over, its not a problem for this kind of thing!
>
> Caveat: I've only tried his from Windows 98 but I don't know of any reason
> it shouldn't work from an XP CMD prompt. If
>
> echo "hello world" > PRN:
>
> works then it should work from Python too.
>
> HTH,
>
> Alan G.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110212/bd5eb0cc/attachment.html>


More information about the Tutor mailing list