1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-12-02 09:43:30 +00:00

DOC, IMPROVE improve docstrings and add abstract method _raw to Escpos

This commit is contained in:
Patrick Kanzler
2015-11-27 23:10:20 +01:00
parent 8b5798eedf
commit 0dacc35d94
3 changed files with 105 additions and 23 deletions

View File

@@ -20,11 +20,11 @@ class Usb(Escpos):
def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01):
"""
@param idVendor : Vendor ID
@param idProduct : Product ID
@param interface : USB device interface
@param in_ep : Input end point
@param out_ep : Output end point
:param idVendor: Vendor ID
:param idProduct: Product ID
:param interface: USB device interface
:param in_ep: Input end point
:param out_ep: Output end point
"""
self.idVendor = idVendor
self.idProduct = idProduct
@@ -34,7 +34,7 @@ class Usb(Escpos):
self.open()
def open(self):
""" Search device on USB tree and set is as escpos device """
""" Search device on USB tree and set it as escpos device """
self.device = usb.core.find(idVendor=self.idVendor, idProduct=self.idProduct)
if self.device is None:
print "Cable isn't plugged in"