How to use the escpos.escpos 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 python-escpos / python-escpos / test / test_with_statement.py View on Github external
def test_with_statement():
    """Use with statement"""
    dummy_printer = printer.Dummy()
    with escpos.EscposIO(dummy_printer) as p:
            p.writelines('Some text.\n')
    # TODO extend these tests as they don't really do anything at the moment