I would like print to /dev/usb/lp0
from my python code. In bash
it is very simple: echo 'apple' >/dev/usb/lp0
I found linemode, but this is not working. When I try to install it I get these errors.
byte-compiling build/bdist.linux-x86_64/egg/linemode/renderers/xml.py to xml.pyc
File "build/bdist.linux-x86_64/egg/linemode/renderers/xml.py", line 67
def __init__(self, source, *, max_width=None, prelude=True):
^
SyntaxError: invalid syntax
How I print to /dev/usb/lp0
from python code?