On 6/13/10 11:12 AM, Anssi Saari wrote:
I actually looked into label printers recently. It seems that at least
the cheaper models from Brother and Dymo accept a bitmap in specific
dimensions and they print it pixel exactly. Very simple, in other
words. But different printers need different formats, which is why
there are printer drivers. I'd assume the DOS program you mention
supports a very specific Dymo printer?
Honestly, I don't know. The interface of that program usually has me
grinding my teeth within minutes. It was written years ago, and is in
fact now being updated... to a 'new' version of BASIC (still with a
'DOS' interface) only because the existing version will not run on
anything newer than Win XP due to memory issues (assuming I understood
the problem correctly). I was looking today and see that Dymo makes a
SDK available that is supposed to be cross-platform (more specifically,
download the SDK for the platform you want to use), but given the age of
this setup... I'm guessing it was probably hard-coded to a particular
device.
The labels are sliding backwards into the 'nice to have' category.
Being able to print out the final results sheets (one or two pages at
the end of the day) is the primary goal at this point.
Anyways, for operating systems using CUPS for printing (that would be
Mac OS X, Linux, *BSD at least), there seems to be pycups which wraps
the CUPS API.
From a quick study of
http://timgolden.me.uk/python/win32_how_do_i/print.html, it looks like
in Windows you can just use the win32 APIs for printing, which is
hard. An easier alternative seems to be using PIL to generate a DIB
with your data in it and printing that.
Actually... for the results sheet, the shellExecute method he described
just might work.
--
http://mail.python.org/mailman/listinfo/python-list