Before I start figuring out how to use wxPrinter (and others), can someone please give me a heads-up:
1. I am writing my first Python app - a point of sale system. The learning curve is steeper than I predicted but I am slowly chewing my way through it - and enjoying it.
2. Receipts will be printed on an Epson TM88 - a thermal 80mm narrow printer
3. The demo prints to the printer just fine. Would I be correct in describing it as 'page' printing?
4. In the past I have used 'line' printing to construct receipts - mostly so I can send control codes to the printer, the most important being to activate the knife (What? No knives on a laser printer? You don't know what you are missing)
So I start in the right direction, can someone point it out to me?
Before I start figuring out how to use wxPrinter (and others), can someone
please give me a heads-up:
1. I am writing my first Python app - a point of sale system. The learning
curve is steeper than I predicted but I am slowly chewing my way through
it - and enjoying it.
2. Receipts will be printed on an Epson TM88 - a thermal 80mm narrow
printer
3. The demo prints to the printer just fine. Would I be correct in
describing it as 'page' printing?
4. In the past I have used 'line' printing to construct receipts - mostly so
I can send control codes to the printer, the most important being to
activate the knife (What? No knives on a laser printer? You don't know what
you are missing)
So I start in the right direction, can someone point it out to me?
Before I start figuring out how to use wxPrinter (and others), can someone please give me a heads-up:
1. I am writing my first Python app - a point of sale system. The learning curve is steeper than I predicted but I am slowly chewing my way through it - and enjoying it.
2. Receipts will be printed on an Epson TM88 - a thermal 80mm narrow printer
3. The demo prints to the printer just fine. Would I be correct in describing it as 'page' printing?
Yes.
4. In the past I have used 'line' printing to construct receipts - mostly so I can send control codes to the printer, the most important being to activate the knife (What? No knives on a laser printer? You don't know what you are missing)
I think we need knives in keyboards!
So I start in the right direction, can someone point it out to me?
I don't think that the wx Printing Framework is the way to go for you, unless you want to do real fancy stuff on the receipts. Even if you do use it you'll probably still have to do something special to activate the knife. Anybody know how to get a Python stream to the raw printer?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
> So I start in the right direction, can someone point it out to me?
I don't think that the wx Printing Framework is the way to go for you,
unless you want to do real fancy stuff on the receipts. Even if you do
use it you'll probably still have to do something special to activate
the knife. Anybody know how to get a Python stream to the raw printer?
The TM88 uses a standard RS232 connection, so any one of the various serial
port interface packages out there will work quite nicely. I've used one or
two for similar tasks and just 'wrapped' them with methods that make them
appear to be file objects. Then it's just a matter of write() and read() as
needed.
Of course, if you want to get fancy, I'm in over my head
> > So I start in the right direction, can someone point it out to me?
> I don't think that the wx Printing Framework is the way to go for you,
> unless you want to do real fancy stuff on the receipts. Even if you do
> use it you'll probably still have to do something special to activate
> the knife. Anybody know how to get a Python stream to the raw printer?
The TM88 uses a standard RS232 connection, so any one of the various
serial
port interface packages out there will work quite nicely. I've used one or
two for similar tasks and just 'wrapped' them with methods that make them
appear to be file objects. Then it's just a matter of write() and read()
as
needed.
Of course, if you want to get fancy, I'm in over my head
In this case my TM88 uses a parallel port. Are there any port interface
packages for parallel ports? Until I figure that out I am writing the
printer control proof of concept in Perl. When you can send raw data to the
printer it is easy.
It contains both serial and parallel packages. I am using
the serial stuff on Windows, Linux and Mac and have around
20,000 users of my app so it works well in the real world.
It contains both serial and parallel packages. I am using
the serial stuff on Windows, Linux and Mac and have around
20,000 users of my app so it works well in the real world.
Roger
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
"The windows version needs a compiled extension and the giveio.sys driver
for Windows NT/2k/XP. The extension module can be compiled with distutils
with either MSVC or GCC/mingw32."
Forgive me, can you point me to a resource that I can translate this?
Mike Edmonds
···
----- Original Message -----
From: "Roger Binns" <rogerb@rogerbinns.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Thursday, November 20, 2003 9:45 PM
Subject: Re: [wxPython-users] Line printing?
> Are there any port interface packages for parallel ports?
It contains both serial and parallel packages. I am using
the serial stuff on Windows, Linux and Mac and have around
20,000 users of my app so it works well in the real world.
Roger
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
"The windows version needs a compiled extension and the giveio.sys driver
for Windows NT/2k/XP. The extension module can be compiled with distutils
with either MSVC or GCC/mingw32."
Forgive me, can you point me to a resource that I can translate this?
That is if you need independent control of the parallel port lines.
You can't do it from user space, so a kernel driver is used to let
user space do it. There also has be some Python to C userspace
glue code. (You will have the same issues no matter what language
you write your code in). If you need to proceed with this route,
then you will need to have Microsoft Visual C++ installed or
Mingw (Google it). Download the package and do:
python setup.py install
That will arrange for all the compiling and put the stuff in the right
place. You only need to do this on your developer machine. For
redistribution, use py2exe which will take copies of what you compiled.
If you don't need control of the parallel port lines, but instead just
want to send plain old data, you will need this bit of rocket science
and no need to install pyparallel or any other software:
Windows:
f=open("lpt1:", "wb")
f.write("this is a test\r\n")
Linux:
f=open("/dev/lp0", "wb")
f.write("this is a test\r\n")
In Thursday, November 20, 2003, 5:22:49 AM, Mike wrote:
In this case my TM88 uses a parallel port. Are there any port
interface packages for parallel ports? (...) When you
can send raw data to the printer it is easy.
----- Original Message -----
From: "Roger Binns" <rogerb@rogerbinns.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Thursday, November 20, 2003 10:23 PM
Subject: Re: [wxPython-users] Line printing?
> From the pyParallel page:
>
> "The windows version needs a compiled extension and the giveio.sys
driver
> for Windows NT/2k/XP. The extension module can be compiled with
distutils
> with either MSVC or GCC/mingw32."
>
> Forgive me, can you point me to a resource that I can translate this?
That is if you need independent control of the parallel port lines.
You can't do it from user space, so a kernel driver is used to let
user space do it. There also has be some Python to C userspace
glue code. (You will have the same issues no matter what language
you write your code in). If you need to proceed with this route,
then you will need to have Microsoft Visual C++ installed or
Mingw (Google it). Download the package and do:
python setup.py install
That will arrange for all the compiling and put the stuff in the right
place. You only need to do this on your developer machine. For
redistribution, use py2exe which will take copies of what you compiled.
If you don't need control of the parallel port lines, but instead just
want to send plain old data, you will need this bit of rocket science
and no need to install pyparallel or any other software:
Windows:
f=open("lpt1:", "wb")
f.write("this is a test\r\n")
Linux:
f=open("/dev/lp0", "wb")
f.write("this is a test\r\n")
Roger
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org