Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str Str Str Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str Str Str Str FunctionDef arguments args defaults kwarg body Return SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults kwarg body Return SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad Expr Str Assign NameStore Dict Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Dict body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd CompareLtELtE Num NameLoad Num CompareLtELtE Num NameLoad Num body Assign NameStore BinOpAdd BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Str Call NameLoad NameLoad orelse Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad body Raise Call NameLoad Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad body Raise Call NameLoad Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr Str Str If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Num Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore BinOpAdd Num Call NameLoad NameLoad Assign NameStore BinOpBitAnd BinOpRShift NameLoad Num Num Assign NameStore BinOpBitAnd NameLoad Num Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Call NameLoad NameLoad Call NameLoad NameLoad Str Str Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Num Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad body Assign NameStore IfExp NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num kwarg body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Num If CompareNotIn NameLoad Call NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num kwarg body If CompareNotIn NameLoad Call NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore IfExp CompareEq NameLoad Num Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Dict body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp NameLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Str NameLoad decorator_list decorator_list
N/A N/A re N/A time N/A barcode N/A feature helpers is_value_in N/A QRCODE_ERROR_CORRECTION_MAP N/A N/A barcode QRCODE_ERROR_CORRECTION_L N/A barcode QRCODE_ERROR_CORRECTION_M N/A barcode QRCODE_ERROR_CORRECTION_Q N/A barcode QRCODE_ERROR_CORRECTION_H 0 1 2 3 N/A QRCODE_MODULE_SIZE_MAP N/A N/A barcode QRCODE_MODULE_SIZE_4 N/A barcode QRCODE_MODULE_SIZE_5 N/A barcode QRCODE_MODULE_SIZE_6 N/A barcode QRCODE_MODULE_SIZE_7 N/A barcode QRCODE_MODULE_SIZE_8 _get_qrcode_error_correction N/A N/A N/A kwargs N/A N/A N/A QRCODE_ERROR_CORRECTION_MAP N/A N/A N/A kwargs get qrcode_ecc_level N/A barcode QRCODE_ERROR_CORRECTION_L N/A _get_qrcode_module_size N/A N/A N/A kwargs N/A N/A N/A QRCODE_MODULE_SIZE_MAP N/A N/A N/A kwargs get qrcode_module_size N/A barcode QRCODE_MODULE_SIZE_4 N/A GenericESCPOS N/A object N/A N/A device None N/A 
    The device where ESCPOS commands will be written.

    Indeed, it is an instance of a connection that represents a real device on
    the other end. It may be a serial RS232 connection, a bluetooth connection,
    a USB connection, a network connection, or whatever any other way we can
    ``catch`` it, ``write`` to and ``read`` from.
     N/A hardware_features N/A N/A 
    A mapping of hardware features.
     __init__ N/A N/A self device features N/A N/A N/A N/A N/A N/A N/A super GenericESCPOS self __init__ N/A N/A self hardware_features N/A feature _SET N/A N/A N/A N/A self hardware_features update features N/A N/A self device device N/A N/A N/A N/A self device catch N/A init N/A N/A self N/A N/A N/A N/A N/A N/A self device write @ N/A lf N/A N/A self lines N/A 1 N/A N/A 
        Line feed. Issues a line feed to printer *n*-times.
         N/A i N/A xrange lines N/A N/A N/A N/A N/A self device write N/A textout N/A N/A self text N/A N/A N/A 
        Write text "as-is".
         N/A N/A N/A N/A self device write text N/A text N/A N/A self text N/A N/A N/A 
        Write text followed by a line feed.
         N/A N/A N/A self textout text N/A N/A N/A self lf N/A text_center N/A N/A self text N/A N/A N/A 
        Shortcut method for print centered text.
         N/A N/A N/A self justify_center N/A N/A N/A self text text N/A justify_center N/A N/A self N/A N/A N/A N/A N/A N/A self device write a N/A justify_left N/A N/A self N/A N/A N/A N/A N/A N/A self device write a N/A justify_right N/A N/A self N/A N/A N/A N/A N/A N/A self device write a N/A set_text_size N/A N/A self width height N/A N/A N/A N/A N/A 0 width 7 N/A 0 height 7 N/A N/A size N/A N/A 16 width height N/A N/A N/A N/A self device write N/A ! N/A chr size N/A N/A N/A ValueError N/A N/A Width and height should be between 0 and 7 (1x through 8x of magnification); got: width={!r}, height={!r} format width height N/A set_expanded N/A N/A self flag N/A N/A N/A param N/A flag N/A N/A N/A N/A self device write ! N/A set_condensed N/A N/A self flag N/A N/A N/A param N/A flag N/A N/A N/A N/A self device write N/A param N/A set_emphasized N/A N/A self flag N/A N/A N/A param N/A flag N/A N/A N/A N/A self device write N/A E param N/A ean13 N/A N/A self data N/A kwargs N/A N/A 
        Render given ``data`` as **EAN-13** barcode symbology.
         N/A N/A N/A N/A re match \d{13} data N/A N/A N/A ValueError N/A N/A EAN-13 symbology requires 13 digits of data; got {:d} digits ("{!s}") format N/A len data data N/A N/A N/A barcode validate_barcode_args kwargs N/A N/A N/A self _ean13_impl data kwargs N/A _ean13_impl N/A N/A self data N/A kwargs N/A N/A N/A NotImplementedError N/A ean8 N/A N/A self data N/A kwargs N/A N/A 
        Render given ``data`` as **EAN-8** barcode symbology.
         N/A N/A N/A N/A re match \d{8} data N/A N/A N/A ValueError N/A N/A EAN-8 symbology requires 8 digits of data; got {:d} digits ("{!s}") format N/A len data data N/A N/A N/A barcode validate_barcode_args kwargs N/A N/A N/A self _ean8_impl data kwargs N/A _ean8_impl N/A N/A self data N/A kwargs N/A N/A N/A NotImplementedError N/A code128 N/A N/A self data N/A kwargs N/A N/A Renders given ``data`` as **Code 128** barcode symbology.

        :param str codeset: Optional. Keyword argument for the subtype (code
            set) to render. Defaults to :attr:`escpos.barcode.CODE128_A`.

        .. warning::

            You should draw up your data according to the subtype (code set).
            The default is **Code 128 A** and there is no way (yet) to mix code
            sets in a single barcode rendering (at least not uniformly).

            Implementations may simply ignore the code set.

         N/A N/A N/A N/A re match ^[\x20-\x7F]+$ data N/A N/A N/A ValueError N/A Invalid Code 128 symbology. Code 128 can encode any ASCII character ranging from 32 (20h) to 127 (7Fh); got "%s" data N/A N/A N/A barcode validate_barcode_args kwargs N/A N/A N/A self _code128_impl data kwargs N/A _code128_impl N/A N/A self data N/A kwargs N/A N/A codeset N/A N/A kwargs get codeset A N/A N/A N/A is_value_in N/A barcode CODE128_CODESETS codeset N/A N/A N/A ValueError N/A N/A Unknown Code 128 code set: {!r} format codeset N/A encoded_data N/A N/A {{{0}{1} format codeset data N/A commands N/A N/A barcode gs_k_barcode N/A barcode CODE128 encoded_data kwargs N/A cmd commands N/A N/A N/A N/A N/A self device write cmd N/A N/A N/A time sleep 0.25 N/A N/A N/A N/A self device read N/A qrcode N/A N/A self data N/A kwargs N/A N/A 
        Render given ``data`` as `QRCode <http://www.qrcode.com/en/>`_.
         N/A N/A N/A barcode validate_qrcode_args kwargs N/A N/A N/A self _qrcode_impl data kwargs N/A _qrcode_impl N/A N/A self data N/A kwargs N/A N/A num_bytes N/A 3 N/A len data N/A size_H N/A N/A num_bytes 8 255 N/A size_L N/A num_bytes 255 N/A commands N/A N/A N/A N/A commands append N/A (k N/A chr size_L N/A chr size_H 1 P 0 data N/A N/A N/A commands append N/A (k 1 E N/A _get_qrcode_error_correction kwargs N/A N/A N/A commands append N/A (k 1 C N/A _get_qrcode_module_size kwargs N/A N/A N/A commands append N/A (k 1 Q 0 N/A cmd commands N/A N/A N/A N/A N/A self device write N/A N/A join cmd N/A N/A N/A time sleep 1 N/A N/A N/A N/A self device read N/A cut N/A N/A self partial N/A True N/A N/A 
        Trigger cutter to perform partial (default) or full paper cut.
         N/A N/A N/A N/A self hardware_features get N/A feature CUTTER False N/A N/A param N/A partial N/A N/A N/A N/A self device write N/A V param N/A kick_drawer N/A N/A self port N/A 0 kwargs N/A N/A Kick drawer connected to the given port.

        In this implementation, cash drawers are identified according to the
        port in which they are connected. This relation between drawers and
        ports does not exists in the ESC/POS specification and it is just a
        design decision to normalize cash drawers handling. From the user
        application perspective, drawers are simply connected to port 0, 1, 2,
        and so on.

        If printer does not have this feature then nothing happens.

        :param int number: The port number to kick drawer (default is ``0``).

        :raises CashDrawerException: If given port does not exists.
         N/A N/A N/A N/A self hardware_features get N/A feature CASHDRAWER_PORTS False N/A N/A max_ports N/A N/A N/A self hardware_features get N/A feature CASHDRAWER_AVAILABLE_PORTS 1 N/A N/A port N/A xrange max_ports N/A N/A N/A CashDrawerException N/A N/A invalid cash drawer port: {!r} (available ports are {!r}) format port N/A range max_ports N/A N/A N/A self _kick_drawer_impl port port kwargs N/A _kick_drawer_impl N/A N/A self port N/A 0 kwargs N/A N/A N/A port N/A xrange 2 N/A N/A N/A CashDrawerException N/A N/A invalid cash drawer port: {!r} format port N/A param N/A N/A port 0 N/A N/A N/A N/A self device write N/A p param N/A N/A TMT20 N/A GenericESCPOS N/A N/A Epson TM-T20 thermal printer. __init__ N/A N/A self device features N/A N/A N/A N/A N/A N/A N/A super TMT20 self __init__ device N/A N/A N/A N/A self hardware_features update N/A N/A feature CUTTER N/A feature CASHDRAWER_PORTS N/A feature CASHDRAWER_AVAILABLE_PORTS True True 1 N/A N/A N/A N/A self hardware_features update features N/A set_expanded N/A N/A self flag N/A N/A N/A w N/A flag 1 0 N/A N/A N/A self set_text_size w 0 N/A set_condensed N/A N/A self flag N/A N/A N/A param N/A flag N/A N/A N/A N/A self device write N/A ! param N/A N/A