How to use the escpos.escpos.Escpos.__init__ function in escpos

To help you get started, we’ve selected a few escpos examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paxapos / fiscalberry / Drivers / ReceiptSerialDriver.py View on Github external
def __init__(self, devfile="/dev/ttyS0", baudrate=9600, bytesize=8, timeout=1,
                 parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE,
                 xonxoff=False, dsrdtr=True, codepage="cp858", *args, **kwargs):
        """
        @param devfile  : Device file under dev filesystem
        @param baudrate : Baud rate for serial transmission
        @param bytesize : Serial buffer size
        @param timeout  : Read/Write timeout
        """
        escpos.Escpos.__init__(self, *args, **kwargs)
        self.devfile = devfile
        self.baudrate = baudrate
        self.bytesize = bytesize
        self.timeout = timeout
        self.parity = parity
        self.stopbits = stopbits
        self.xonxoff = xonxoff
        self.dsrdtr = dsrdtr
        self.codepage = codepage
github paxapos / fiscalberry / Drivers / ReceiptUSBDriver.py View on Github external
def __init__(self, usb_vendor, usb_product, timeout=0, in_ep=0x82, out_ep=0x01, codepage="cp858", *args, **kwargs):  # noqa: N803
        """
        :param idVendor: Vendor ID
        :param idProduct: Product ID
        :param timeout: Is the time limit of the USB operation. Default without timeout.
        :param in_ep: Input end point
        :param out_ep: Output end point
        """
        escpos.Escpos.__init__(self, *args, **kwargs)
        self.idVendor = usb_vendor
        self.idProduct = usb_product
        self.timeout = timeout
        self.in_ep = in_ep
        self.out_ep = out_ep
        self.codepage = codepage
github paxapos / fiscalberry / Drivers / ReceiptDirectJetDriver.py View on Github external
def __init__(self, host, port=9100, timeout=10, codepage="cp858", mac="", *args, **kwargs):
        """ escrito aqui solo para tener bien en claro las variables iniciales"""
        """
        :param host : Printer's hostname or IP address
        :param port : Port to write to
        :param timeout : timeout in seconds for the socket-library
        :param codepage : codepage default to cp858
        """
        escpos.Escpos.__init__(self, *args, **kwargs)
        self.host = host
        self.port = port
        self.timeout = timeout
        self.codepage = codepage