Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

direct output to printer

0 views
Skip to first unread message

Uwe Schmitt

unread,
Jun 7, 2002, 5:19:33 PM6/7/02
to
Hi,

I'd like to print barcodes with a special barcode printer.
Therefore I have to send raw ASCII data to the printer.
How can I do this using Python under Windows ???

Greetings, Uwe.

--
Dr. rer. nat. Uwe Schmitt python, php, c, c++, codes, tips, tutorials at
uwe.s...@procoders.net http://www.procoders.net

Chris Liechti

unread,
Jun 7, 2002, 5:43:05 PM6/7/02
to
Uwe Schmitt <uwe.s...@procoders.net> wrote in
news:adr815$e6m39$2...@hades.rz.uni-sb.de:

> I'd like to print barcodes with a special barcode printer.
> Therefore I have to send raw ASCII data to the printer.
> How can I do this using Python under Windows ???

there is a raw print function in win32all, but i haven't used that. for the
barcode-printer i used, i sent a bitmap with the barcode. that way you can
print the same barcode on paper or preview on the screen (i used wxPython).

there are some free barcode fonts around. i use this one:
http://www.squaregear.net/fonts/

chris

--
Chris <clie...@gmx.net>

Gustavo Cordova

unread,
Jun 7, 2002, 5:44:38 PM6/7/02
to
>
> Hi,

>
> I'd like to print barcodes with a special barcode printer.
> Therefore I have to send raw ASCII data to the printer.
> How can I do this using Python under Windows ???
>
> Greetings, Uwe.
>

Same way you'd do it in MSDOS
(if you have it connected to a parallel port):

>>> lpt = open("lpt1:", "w")
>>> lpt.write(BarcodeDataString)
>>> lpt.close()

You can also use "prn:" instead of "lpt1:"

:-)

-gustavo

pd: Win's just MSDOS with icing on top. ;-)


0 new messages