From fb18bb34ccc42637fa710110a0ea8ed7d85cd175 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 30 Jan 2017 02:15:40 +0100 Subject: [PATCH] normalize imports --- src/escpos/escpos.py | 19 +++++++++++++++++-- src/escpos/magicencode.py | 4 +--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 48c06d7..617ff0c 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -17,9 +17,24 @@ from __future__ import unicode_literals import qrcode import textwrap +import six + +from .constants import ESC, GS, NUL, QR_ECLEVEL_L, QR_ECLEVEL_M, QR_ECLEVEL_H, QR_ECLEVEL_Q +from .constants import QR_MODEL_1, QR_MODEL_2, QR_MICRO, BARCODE_TYPES, BARCODE_HEIGHT, BARCODE_WIDTH +from .constants import TXT_ALIGN_CT, TXT_ALIGN_LT, TXT_ALIGN_RT, BARCODE_FONT_A, BARCODE_FONT_B +from .constants import BARCODE_TXT_OFF, BARCODE_TXT_BTH, BARCODE_TXT_ABV, BARCODE_TXT_BLW +from .constants import TXT_HEIGHT, TXT_WIDTH, TXT_SIZE, TXT_NORMAL, TXT_SMOOTH_OFF, TXT_SMOOTH_ON +from .constants import TXT_FLIP_OFF, TXT_FLIP_ON, TXT_2WIDTH, TXT_2HEIGHT, TXT_4SQUARE +from .constants import TXT_UNDERL_OFF, TXT_UNDERL_ON, TXT_BOLD_OFF, TXT_BOLD_ON, SET_FONT, TXT_UNDERL2_ON +from .constants import TXT_INVERT_OFF, TXT_INVERT_ON, LINESPACING_FUNCS, LINESPACING_RESET +from .constants import PD_0, PD_N12, PD_N25, PD_N37, PD_N50, PD_P50, PD_P37, PD_P25, PD_P12 +from .constants import CD_KICK_DEC_SEQUENCE, CD_KICK_5, CD_KICK_2, PAPER_FULL_CUT, PAPER_PART_CUT +from .constants import HW_RESET, HW_SELECT, HW_INIT +from .constants import CTL_VT, CTL_HT, CTL_CR, CTL_FF, CTL_LF, CTL_SET_HT, PANEL_BUTTON_OFF, PANEL_BUTTON_ON + +from .exceptions import BarcodeTypeError, BarcodeSizeError, TabPosError +from .exceptions import CashDrawerError, SetVariableError, BarcodeCodeError -from .constants import * -from .exceptions import * from .magicencode import MagicEncode from abc import ABCMeta, abstractmethod # abstract base class support diff --git a/src/escpos/magicencode.py b/src/escpos/magicencode.py index 8842c75..9c71ea0 100644 --- a/src/escpos/magicencode.py +++ b/src/escpos/magicencode.py @@ -19,10 +19,8 @@ from __future__ import unicode_literals from builtins import bytes from .constants import CODEPAGE_CHANGE -from .exceptions import CharCodeError, Error -from .capabilities import get_profile +from .exceptions import Error from .codepages import CodePages -import copy import six