[Tutor] capture :LPT

janos.juhasz@VELUX.com janos.juhasz@VELUX.com
Thu Dec 19 02:25:01 2002


Dear Gurus,

I have an ERP like program, that can't use the WINDOWS printing correct=
ly,
but printing nicely to DOS printers.
My idea was to printing to the - for example - :LPT2 port, where wouldn=
't
be any printer device just a a program, that could capture all the data=

sent to the printer.
It would be a python program.
It would filter and reshape the printing and would send it to a real pr=
int
device on any other port.

I have tried it with  p =3D open("LPT1:", "rb") and an infinite loop, b=
ut it
just hung up. :(

>>> p =3D open("LPT1:", "rb")
>>> while 1:
...   print p.read(1)

Is it possible under MS?

Best regards,
-----------------------
Juh=E1sz J=E1nos
IT department
E-Mail: janos.juhasz@VELUX.com
=