diff --git a/examples/barcodes.py b/examples/barcodes.py index 86bc77b..9eec4f5 100644 --- a/examples/barcodes.py +++ b/examples/barcodes.py @@ -1,3 +1,8 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + from escpos.printer import Usb diff --git a/examples/codepage_tables.py b/examples/codepage_tables.py index 2b5e98a..e5b0d66 100644 --- a/examples/codepage_tables.py +++ b/examples/codepage_tables.py @@ -1,13 +1,16 @@ """Prints code page tables. """ - +from __future__ import absolute_import +from __future__ import division from __future__ import print_function +from __future__ import unicode_literals -import six import sys from escpos import printer -from escpos.constants import CODEPAGE_CHANGE, ESC, CTL_LF, CTL_FF, CTL_CR, CTL_HT, CTL_VT +from escpos.constants import CODEPAGE_CHANGE, CTL_CR, CTL_FF, CTL_HT, CTL_LF, CTL_VT, ESC + +import six def main(): diff --git a/examples/qr_code.py b/examples/qr_code.py index 15120b4..8fa9341 100644 --- a/examples/qr_code.py +++ b/examples/qr_code.py @@ -1,3 +1,8 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + import sys from escpos.printer import Usb diff --git a/examples/software_barcode.py b/examples/software_barcode.py index 93c8e30..458cff0 100644 --- a/examples/software_barcode.py +++ b/examples/software_barcode.py @@ -1,3 +1,8 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + from escpos.printer import Usb diff --git a/examples/weather.py b/examples/weather.py index 4dc9923..b370820 100644 --- a/examples/weather.py +++ b/examples/weather.py @@ -12,14 +12,17 @@ # Icons taken from http://adamwhitcroft.com/climacons/ # Check out his github: https://github.com/AdamWhitcroft/climacons - +from __future__ import absolute_import +from __future__ import division from __future__ import print_function -from datetime import datetime +from __future__ import unicode_literals + import calendar -import urllib import json -import time import os +import time +import urllib +from datetime import datetime from escpos.printer import Usb diff --git a/setup.py b/setup.py index d09c472..dbdcaae 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,13 @@ #!/usr/bin/env python +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +# from __future__ import unicode_literals + import os import sys + from setuptools import find_packages, setup diff --git a/src/escpos/capabilities.py b/src/escpos/capabilities.py index 0cf76e1..c39d8c8 100644 --- a/src/escpos/capabilities.py +++ b/src/escpos/capabilities.py @@ -1,3 +1,8 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + import re from os import environ, path import pickle