Printing to printer, windows 7

MRAB python at mrabarnett.plus.com
Tue Feb 17 21:11:50 EST 2015


On 2015-02-18 01:41, Dennis Lee Bieber wrote:
> On Mon, 16 Feb 2015 22:02:33 -0500, Dave Angel <davea at davea.name> declaimed
> the following:
>
>
>>It is a simple problem.  All you have to do is send the correct bytes to
>>a file object that will transfer those bytes to the printer.  It's been
>>a long time since I used Windows, but if I recall, you just open the
>>device "prn"  or maybe "lpt1" and go.
>>
>
> C:\Users\Wulfraed\Documents>copy t.txt prn:
> "prn:" is not a recognized device.
> The system cannot find the file specified.
>
> C:\Users\Wulfraed\Documents>copy t.txt lpt1:
> "lpt1:" is not a recognized device.
> The system cannot find the file specified.
>
> 	And...
>
> C:\Users\Wulfraed\Documents>copy t.txt CN3BSFVGP805ZZ:
> "CN3BSFVGP805ZZ:" is not a recognized device.
> The system cannot find the file specified.
>
> 	That's the port name associated with my HP printer when looking at the
> control panel properties.
>
> 	LPT1: appears to be linked to "Quicken PDF Printer" in the port list,
> but is not available from command line.
>
You can use the "NET USE" command to make LPT1: refer to your printer.
The details are on the Web. :-)




More information about the Python-list mailing list