Python Forum

Full Version: setup epson lq350 dot matrix printer by python-printer-escpos
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hello
i want to setup epson lq350 dot matrix printer...
i used python-printer-escpos module
my program is:
[rom escpos.connections import getUSBPrinter


printer = getUSBPrinter()(idVendor=0x1504,
                          idProduct=0x0006,
                          inputEndPoint=0x82,
                          outputEndPoint=0x01) # Create the printer object with the connection params

printer.text("Hello World")
printer.lf()]
[/python]

i got this error

[Traceback (most recent call last):
 File "/home/pi/start/printerr/lq350/test.py", line 7, in <module>
   outputEndPoint=0x01) # Create the printer object with the connection params
 File "/usr/local/lib/python3.4/dist-packages/escpos/connections.py", line 87, in __init__
   self.__open()
 File "/usr/local/lib/python3.4/dist-packages/escpos/connections.py", line 104, in __open
   raise RuntimeError("Cable isn't plugged in")
RuntimeError: Cable isn't plugged in]
[/python]

why???????
please help....
Is the cable plugged in?
have you read and following the instructions at: http://pythonhosted.org/python-printer-escpos/

You may also want to look at the following packages: https://pypi.python.org/pypi?%3Aaction=s...mit=search
Also, since this driver is for the POS receipt printers, will it work with the printer you are using?
(May-30-2017, 11:14 AM)Larz60+ Wrote: [ -> ]Is the cable plugged in?
have you read and following the instructions at: http://pythonhosted.org/python-printer-escpos/

You may also want to look at the following packages: https://pypi.python.org/pypi?%3Aaction=s...mit=search
Also, since this driver is for the POS receipt printers, will it work with the printer you are using?

does lq350 printer support escpos????
what module should i use???
Looks like you can get a printer driver here: https://download.epson-biz.com/modules/d...t=2&pid=15
have you installed that?
No matter what you use to print with (in Python), you will need to install a driver first.
(May-31-2017, 03:24 PM)Larz60+ Wrote: [ -> ]Looks like you can get a printer driver here: https://download.epson-biz.com/modules/d...t=2&pid=15
have you installed that?
No matter what you use to print with (in Python), you will need to install a driver first.

ok....
then you mean
can't escpos commands of python replaced by a driver?
thank you for your link...
but it has just windows driver not linux
All devices need a driver. The most common ones are installed automatically (plug & play)
The odd ones have to be installed.
The application sends commands to the driver, the driver interprets these commands and send the
appropriate signals to the printer
so you still need to install a driver, or check if it's already installed.
(Jun-01-2017, 04:32 AM)Larz60+ Wrote: [ -> ]All devices need a driver. The most common ones are installed automatically (plug & play)
The odd ones have to be installed.
The application sends commands to the driver, the driver interprets these commands and send the
appropriate signals to the printer
so you still need to install a driver, or check if it's already installed.

i didn't uninstall driver...but i used CUPS and i could print a simple test file without using the python code...after this success now i want to use pycups module in python...
what's your oponin???
it means that the driver has installed by cups??? i'm not sure since i didn't use any ppd file for installing driver
If it will do what you need, go for it!
(Jun-02-2017, 03:15 PM)Larz60+ Wrote: [ -> ]If it will do what you need, go for it!

does cups do without internet????
I have no idea, haven't used cups directly.

I have written drivers for some obscure printers (IBM high speed  hang tag printers (for clothing in large retail store)), etc.

Drivers make the hardware appear as a generic printer to the application software.

It would be possible to drive a printer directly from the application, but you would be faced with a far different module for each and every printer.
This is why the driver exists.
It is a very good solution to make all printers appear generic.
Pages: 1 2