From 52719c0b7de8948fabdffd180a2d71c22cf4c02b Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Fri, 21 Sep 2018 17:37:42 +0200 Subject: [PATCH 01/21] Allow arbitrary USB args --- AUTHORS | 1 + src/escpos/printer.py | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/AUTHORS b/AUTHORS index aa3cce8..6000080 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,6 +8,7 @@ Curtis // mashedkeyboard Davis Goglin Dean Rispin Dmytro Katyukha +Gerard Marull-Paretas Hark Joel Lehtonen kennedy diff --git a/src/escpos/printer.py b/src/escpos/printer.py index a652b98..d7fc6ac 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -34,28 +34,40 @@ class Usb(Escpos): """ - def __init__(self, idVendor, idProduct, timeout=0, in_ep=0x82, out_ep=0x01, *args, **kwargs): # noqa: N803 + def __init__(self, idVendor, idProduct, usb_args=None, timeout=0, in_ep=0x82, out_ep=0x01, + *args, **kwargs): # noqa: N803 """ :param idVendor: Vendor ID :param idProduct: Product ID + :param usb_args: Optional USB arguments (e.g. custom_match) :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.__init__(self, *args, **kwargs) - self.idVendor = idVendor - self.idProduct = idProduct self.timeout = timeout self.in_ep = in_ep self.out_ep = out_ep - self.open() - def open(self): - """ Search device on USB tree and set it as escpos device """ - self.device = usb.core.find(idVendor=self.idVendor, idProduct=self.idProduct) + usb_args = usb_args or {} + if idVendor: + usb_args['idVendor'] = idVendor + if idProduct: + usb_args['idProduct'] = idProduct + self.open(usb_args) + + def open(self, usb_args): + """ Search device on USB tree and set it as escpos device. + + :param usb_args: USB arguments + """ + self.device = usb.core.find(**usb_args) if self.device is None: raise USBNotFoundError("Device not found or cable not plugged in.") + self.idVendor = self.device.idVendor + self.idProduct = self.device.idProduct + check_driver = None try: From 18c51358aa5fa3cbffdaab9013413eb8deac8c31 Mon Sep 17 00:00:00 2001 From: Ramon Poca Date: Thu, 13 Dec 2018 08:01:05 -0800 Subject: [PATCH 02/21] Add Win32Raw printer to available printers --- src/escpos/printer.py | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index d7fc6ac..a8905d0 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -334,3 +334,51 @@ class Dummy(Escpos): def close(self): pass + + +_WIN32PRINT=False +try: + import win32print + _WIN32PRINT=True +except ImportError: + pass + +if _WIN32PRINT: + class Win32Raw(Escpos): + def __init__(self, printer_name = None, profile=None, magic_encode_args=None, **kwargs): + super().__init__(profile=profile, magic_encode_args=magic_encode_args, **kwargs) + if printer_name is not None: + self.printer_name = printer_name + else: + self.printer_name = win32print.GetDefaultPrinter() + self.hPrinter = None + + + def open(self, job_name="python-escpos"): + if self.printer_name is None: + raise Exception("Printer not found") + self.hPrinter = win32print.OpenPrinter (self.printer_name) + self.current_job = win32print.StartDocPrinter (self.hPrinter, 1, (job_name, None, "RAW")) + win32print.StartPagePrinter (self.hPrinter) + + def close(self): + if not self.hPrinter: + return + win32print.EndPagePrinter (self.hPrinter) + win32print.EndDocPrinter (self.hPrinter) + win32print.ClosePrinter (self.hPrinter) + self.hPrinter = None + + def _raw(self, msg): + """ Print any command sent in raw format + + :param msg: arbitrary code to be printed + :type msg: bytes + """ + if self.printer_name is None: + raise Exception("Printer not found") + if self.hPrinter is None: + raise Exception("Printer job not opened") + win32print.WritePrinter (self.hPrinter, msg) + + From d5b9d99093f0557f46d87b9508ef9b1266cb3631 Mon Sep 17 00:00:00 2001 From: Ramon Poca Date: Mon, 31 Dec 2018 10:43:31 +0100 Subject: [PATCH 03/21] Update AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 6000080..7c5ef60 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,6 +23,7 @@ Nathan Bookham Patrick Kanzler primax79 Qian Linfeng +Ramon Poca reck31 Renato Lorenzi Romain Porte From 73fff6291dd7133667f8d71915a7124f82ea4ea8 Mon Sep 17 00:00:00 2001 From: Ramon Poca Date: Mon, 31 Dec 2018 13:57:53 +0100 Subject: [PATCH 04/21] Fix syntax --- src/escpos/printer.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index a8905d0..ecb708f 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -336,16 +336,16 @@ class Dummy(Escpos): pass -_WIN32PRINT=False +_WIN32PRINT = False try: - import win32print - _WIN32PRINT=True + import win32print + _WIN32PRINT = True except ImportError: - pass + pass if _WIN32PRINT: class Win32Raw(Escpos): - def __init__(self, printer_name = None, profile=None, magic_encode_args=None, **kwargs): + def __init__(self, printer_name=None, profile=None, magic_encode_args=None, **kwargs): super().__init__(profile=profile, magic_encode_args=magic_encode_args, **kwargs) if printer_name is not None: self.printer_name = printer_name @@ -353,22 +353,21 @@ if _WIN32PRINT: self.printer_name = win32print.GetDefaultPrinter() self.hPrinter = None - def open(self, job_name="python-escpos"): if self.printer_name is None: raise Exception("Printer not found") - self.hPrinter = win32print.OpenPrinter (self.printer_name) - self.current_job = win32print.StartDocPrinter (self.hPrinter, 1, (job_name, None, "RAW")) - win32print.StartPagePrinter (self.hPrinter) + self.hPrinter = win32print.OpenPrinter(self.printer_name) + self.current_job = win32print.StartDocPrinter(self.hPrinter, 1, (job_name, None, "RAW")) + win32print.StartPagePrinter(self.hPrinter) def close(self): if not self.hPrinter: return - win32print.EndPagePrinter (self.hPrinter) - win32print.EndDocPrinter (self.hPrinter) - win32print.ClosePrinter (self.hPrinter) + win32print.EndPagePrinter(self.hPrinter) + win32print.EndDocPrinter(self.hPrinter) + win32print.ClosePrinter(self.hPrinter) self.hPrinter = None - + def _raw(self, msg): """ Print any command sent in raw format @@ -379,6 +378,4 @@ if _WIN32PRINT: raise Exception("Printer not found") if self.hPrinter is None: raise Exception("Printer job not opened") - win32print.WritePrinter (self.hPrinter, msg) - - + win32print.WritePrinter(self.hPrinter, msg) From 2886075ce9feabfc76ffa7238e6fcb294cc327ca Mon Sep 17 00:00:00 2001 From: Ramon Poca Date: Mon, 31 Dec 2018 14:24:10 +0100 Subject: [PATCH 05/21] Fix initializer mess --- src/escpos/printer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index ecb708f..f1c6145 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -345,8 +345,8 @@ except ImportError: if _WIN32PRINT: class Win32Raw(Escpos): - def __init__(self, printer_name=None, profile=None, magic_encode_args=None, **kwargs): - super().__init__(profile=profile, magic_encode_args=magic_encode_args, **kwargs) + def __init__(self, printer_name=None, *args, **kwargs): + Escpos.__init__(self, *args, **kwargs) if printer_name is not None: self.printer_name = printer_name else: From dc08792e725ceae58abdb5cc622e09f1b09ddff5 Mon Sep 17 00:00:00 2001 From: akeonly Date: Sat, 11 May 2019 18:33:33 +0700 Subject: [PATCH 06/21] Update README.rst : example for network printer Add example for Network Printer --- README.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.rst b/README.rst index fc551e1..a6d5130 100644 --- a/README.rst +++ b/README.rst @@ -65,6 +65,17 @@ The basic usage is: p.barcode('1324354657687', 'EAN13', 64, 2, '', '') p.cut() +Another example for Network printer: +.. code:: python + + from escpos.printer import Network + + kitchen = Network("192.168.1.100") #Printer IP Address + kitchen.text("Hello World\n") + kitchen.barcode('1324354657687', 'EAN13', 64, 2, '', '') + kitchen.cut() + + The full project-documentation is available on `Read the Docs `_. Contributing From 206822ac696ad8ca249d1d7140f020f5b5a2d7b5 Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Wed, 22 May 2019 16:39:26 +0500 Subject: [PATCH 07/21] Enable Windows Support --- src/escpos/printer.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index d7fc6ac..1763c5c 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -17,6 +17,7 @@ import usb.core import usb.util import serial import socket +import sys from .escpos import Escpos from .exceptions import USBNotFoundError @@ -68,19 +69,22 @@ class Usb(Escpos): self.idVendor = self.device.idVendor self.idProduct = self.device.idProduct - check_driver = None + # detach_kernel_driver() doesn't really work on Windows, + # causing the library to not work on that platform. + if sys.platform != 'win32': + check_driver = None - try: - check_driver = self.device.is_kernel_driver_active(0) - except NotImplementedError: - pass - - if check_driver is None or check_driver: try: - self.device.detach_kernel_driver(0) - except usb.core.USBError as e: - if check_driver is not None: - print("Could not detatch kernel driver: {0}".format(str(e))) + check_driver = self.device.is_kernel_driver_active(0) + except NotImplementedError: + pass + + if check_driver is None or check_driver: + try: + self.device.detach_kernel_driver(0) + except usb.core.USBError as e: + if check_driver is not None: + print("Could not detatch kernel driver: {0}".format(str(e))) try: self.device.set_configuration() From d20646b2a941addfc1ca0cacc6d6cdabcfad41d0 Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Wed, 22 May 2019 17:01:13 +0500 Subject: [PATCH 08/21] Make windows enablement code more intelligent --- src/escpos/printer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index 1763c5c..ed38d4f 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -17,7 +17,6 @@ import usb.core import usb.util import serial import socket -import sys from .escpos import Escpos from .exceptions import USBNotFoundError @@ -69,9 +68,11 @@ class Usb(Escpos): self.idVendor = self.device.idVendor self.idProduct = self.device.idProduct - # detach_kernel_driver() doesn't really work on Windows, - # causing the library to not work on that platform. - if sys.platform != 'win32': + # pyusb has three backends: libusb0, libusb1 and openusb but + # only libusb1 backend implements the methods is_kernel_driver_active() + # and detach_kernel_driver(). This change helps enable this + # library to work on Windows. + if sef.device.backend.__module__.endswith("libusb1"): check_driver = None try: From 035c42558168bfc3d53867a82115ecb917587808 Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Wed, 22 May 2019 17:09:27 +0500 Subject: [PATCH 09/21] Add author --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 6000080..f9e4de9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -20,6 +20,7 @@ Michael Billington Michael Elsdörfer mrwunderbar666 Nathan Bookham +Omer Akram Patrick Kanzler primax79 Qian Linfeng From 7c01a30d6c9c7422bf940659cb7b0c3142be4cc1 Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Wed, 22 May 2019 17:20:15 +0500 Subject: [PATCH 10/21] fix a typo --- src/escpos/printer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index ed38d4f..b20876b 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -72,7 +72,7 @@ class Usb(Escpos): # only libusb1 backend implements the methods is_kernel_driver_active() # and detach_kernel_driver(). This change helps enable this # library to work on Windows. - if sef.device.backend.__module__.endswith("libusb1"): + if self.device.backend.__module__.endswith("libusb1"): check_driver = None try: From 29ef88f5915b0a34ed0fc11e68af7b950872c8eb Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Wed, 22 May 2019 17:25:33 +0500 Subject: [PATCH 11/21] Better comment --- src/escpos/printer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index b20876b..648b4bb 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -70,8 +70,8 @@ class Usb(Escpos): # pyusb has three backends: libusb0, libusb1 and openusb but # only libusb1 backend implements the methods is_kernel_driver_active() - # and detach_kernel_driver(). This change helps enable this - # library to work on Windows. + # and detach_kernel_driver(). + # This helps enable this library to work on Windows. if self.device.backend.__module__.endswith("libusb1"): check_driver = None From 91ff83e5066e8ab262b1c1ae6d71acf46763ca84 Mon Sep 17 00:00:00 2001 From: Justin Vieira Date: Wed, 29 May 2019 11:21:20 -0400 Subject: [PATCH 12/21] Update to use pyyaml safe_load(), as load() is unsafe and disabled on some systems --- AUTHORS | 1 + src/escpos/capabilities.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 6000080..af7e937 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ Dmytro Katyukha Gerard Marull-Paretas Hark Joel Lehtonen +Justin Vieira kennedy Kristi ldos diff --git a/src/escpos/capabilities.py b/src/escpos/capabilities.py index 0cf76e1..c4b6ab5 100644 --- a/src/escpos/capabilities.py +++ b/src/escpos/capabilities.py @@ -38,7 +38,7 @@ else: if full_load: logger.debug('Loading and pickling capabilities') with open(capabilities_path) as cp, open(pickle_path, 'wb') as pp: - CAPABILITIES = yaml.load(cp) + CAPABILITIES = yaml.safe_load(cp) pickle.dump(CAPABILITIES, pp, protocol=2) logger.debug('Finished loading capabilities took %.2fs', time.time() - t0) From 0461adc2126dc78fd3d7f695f72cc22f022b3c00 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 4 Jun 2019 22:17:18 +0200 Subject: [PATCH 13/21] restrict hypothesis-version to below 4 --- setup.py | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6b21450..1f69b4f 100755 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ setup( 'nose', 'scripttest', 'mock', - 'hypothesis!=3.56.9', + 'hypothesis!=3.56.9,<4', 'flake8' ], entry_points={ diff --git a/tox.ini b/tox.ini index 142ca43..0654f3a 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = nose pytest!=3.2.0,!=3.3.0 pytest-cov pytest-mock - hypothesis!=3.56.9 + hypothesis!=3.56.9,<4 viivakoodi commands = py.test --cov escpos passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* From f1054876dae32e2c4289fe0c023bb7e85e09bc4e Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 4 Jun 2019 23:55:33 +0200 Subject: [PATCH 14/21] update authors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 11276d5..9c14d27 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,5 @@ Ahmed Tahri +akeonly Asuki Kono belono Christoph Heuel From edd567785cf2c14decb540726539a43a8afe995a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 4 Jun 2019 23:57:19 +0200 Subject: [PATCH 15/21] fix whitespace --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a6d5130..3eebf6d 100644 --- a/README.rst +++ b/README.rst @@ -65,7 +65,9 @@ The basic usage is: p.barcode('1324354657687', 'EAN13', 64, 2, '', '') p.cut() -Another example for Network printer: + +Another example based on the Network printer class: + .. code:: python from escpos.printer import Network From 29a546821b431dfb271c8d0d0dd69d2eb8efe3c3 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 10 Jun 2019 22:05:26 +0200 Subject: [PATCH 16/21] doc add example for Serial on Windows fixes #322 --- doc/user/usage.rst | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/user/usage.rst b/doc/user/usage.rst index 203389b..37f234a 100644 --- a/doc/user/usage.rst +++ b/doc/user/usage.rst @@ -44,7 +44,7 @@ to have and the second yields the "Output Endpoint" address. :: - Epson = printer.Usb(0x04b8,0x0202) + p = printer.Usb(0x04b8,0x0202) By default the "Interface" number is "0" and the "Output Endpoint" address is "0x01". If you have other values then you can define them on @@ -55,7 +55,7 @@ on 0x81 and out\_ep=0x02, then the printer definition should look like: :: - Generic = printer.Usb(0x1a2b,0x1a2b,0,0x81,0x02) + p = printer.Usb(0x1a2b,0x1a2b,0,0x81,0x02) Network printer ^^^^^^^^^^^^^^^ @@ -67,7 +67,7 @@ IP by DHCP or you set it manually. :: - Epson = printer.Network("192.168.1.99") + p = printer.Network("192.168.1.99") Serial printer ^^^^^^^^^^^^^^ @@ -81,7 +81,10 @@ to. :: - Epson = printer.Serial("/dev/tty0") + p = printer.Serial("/dev/tty0") + + # on a Windows OS serial devices are typically accessible as COM + p = printer.Serial("COM1") Other printers ^^^^^^^^^^^^^^ @@ -93,7 +96,7 @@ passing the device node name. :: - Epson = printer.File("/dev/usb/lp1") + p = printer.File("/dev/usb/lp1") The default is "/dev/usb/lp0", so if the printer is located on that node, then you don't necessary need to pass the node name. @@ -108,17 +111,17 @@ on a USB interface. from escpos import * """ Seiko Epson Corp. Receipt Printer M129 Definitions (EPSON TM-T88IV) """ - Epson = printer.Usb(0x04b8,0x0202) + p = printer.Usb(0x04b8,0x0202) # Print text - Epson.text("Hello World\n") + p.text("Hello World\n") # Print image - Epson.image("logo.gif") + p.image("logo.gif") # Print QR Code - Epson.qr("You can readme from your smartphone") + p.qr("You can readme from your smartphone") # Print barcode - Epson.barcode('1324354657687','EAN13',64,2,'','') + p.barcode('1324354657687','EAN13',64,2,'','') # Cut paper - Epson.cut() + p.cut() Configuration File ------------------ From 5ac5a24b50a36fcb24ea60b8b4aea52ab8ca2ab7 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 11 Jun 2019 00:24:09 +0200 Subject: [PATCH 17/21] Toolchain update travis drop py2x (#336) * drop python 2 from supported languages Python 2 compatibility will not be actively revoked, but will not be worked on. * update travis config * remove flake8-test with Py2.7 --- .travis.yml | 16 ++++++++++------ setup.py | 2 -- tox.ini | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index e871b54..815eb23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: python sudo: false cache: pip +dist: xenial git: depth: 100000 addons: @@ -22,23 +23,26 @@ matrix: env: TOXENV=py36 - python: 3.6-dev env: TOXENV=py36 + - python: 3.7 + env: TOXENV=py37 - python: 3.7-dev env: TOXENV=py37 + - python: 3.8-dev + env: TOXENV=py38 - python: nightly - env: TOXENV=py37 + env: TOXENV=py38 - python: pypy env: TOXENV=pypy - python: pypy3 env: TOXENV=pypy3 - - python: 2.7 + - python: 3.7 env: TOXENV=docs - - python: 2.7 - env: TOXENV=flake8 - - python: 3.6 + - python: 3.7 env: TOXENV=flake8 allow_failures: - python: 3.6-dev - python: 3.7-dev + - python: 3.8-dev - python: nightly - python: pypy3 before_install: @@ -63,4 +67,4 @@ deploy: tags: true repo: python-escpos/python-escpos branch: master - condition: $TRAVIS_PYTHON_VERSION = "3.6" + condition: $TRAVIS_PYTHON_VERSION = "3.7" diff --git a/setup.py b/setup.py index 1f69b4f..a09bc83 100755 --- a/setup.py +++ b/setup.py @@ -65,8 +65,6 @@ setup( 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', diff --git a/tox.ini b/tox.ini index 0654f3a..9dc7a4f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py34, py35, docs, flake8 +envlist = py27, py34, py35, py36, py37, docs, flake8 [testenv] deps = nose From 8bf0e08659f46266bc3af9f4db9dc545a9885918 Mon Sep 17 00:00:00 2001 From: Alex Debiasio Date: Thu, 13 Jun 2019 21:28:46 +0200 Subject: [PATCH 18/21] Implemented _read method of Network printer class --- src/escpos/printer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index 319d773..54eb74a 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -236,6 +236,11 @@ class Network(Escpos): """ self.device.sendall(msg) + def _read(self): + """ Read data from the TCP socket """ + + return self.device.recv(16) + def close(self): """ Close TCP connection """ if self.device is not None: From a7d959428fc5054dd28e41629e8dd4fa481b6626 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 15 Jun 2019 22:50:50 +0200 Subject: [PATCH 19/21] update authors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 02185a5..89f10bb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,6 @@ Ahmed Tahri akeonly +Alex Debiasio Asuki Kono belono Christoph Heuel From 9dd966c2a377a8e0c61c2a7a93c3459a4a97f7b7 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 15 Jun 2019 23:40:00 +0200 Subject: [PATCH 20/21] update mailmap --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 5b909f6..4540049 100644 --- a/.mailmap +++ b/.mailmap @@ -12,3 +12,4 @@ Juanmi Taboada Juanmi Taboada Sergio Pulgarin reck31 +Alex Debiasio From c56e43da84a7da8e72e2847fc8f52205b8c62bee Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 16 Jun 2019 00:17:04 +0200 Subject: [PATCH 21/21] update changelog --- CHANGELOG.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 360ef2b..abae03f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,29 @@ ********* Changelog ********* +2019-06-16 - Version 3.0a5 - "Lightly Seared On The Reality Grill" +------------------------------------------------------------------ +This release is the sixth alpha release of the new version 3.0. Please +be aware that the API is subject to change until v3.0 is released. + +changes +^^^^^^^ +- allow arbitrary USB arguments in USB-class +- add Win32Raw-Printer on Windows-platforms +- add and improve Windows support of USB-class +- use pyyaml safe_load() +- improve doc +- implement _read method of Network printer class + +contributors +^^^^^^^^^^^^ +- Patrick Kanzler +- Gerard Marull-Paretas +- Ramon Poca +- akeonly +- Omer Akram +- Justin Vieira + 2018-05-15 - Version 3.0a4 - "Kakistocrat" ------------------------------------------ This release is the fifth alpha release of the new version 3.0. Please