* add explicit location of capabilities.json for travis
* pass on env variables in tox builds
* drop support for python 3.3 and remove python3.3 from supported versions list
Add Function to Dummy Printer for Clearing Buffer
If you are using the dummy printer, you may want to use the printer
again after sending the output to a physical printer.
This method empties the list of the output buffer.
When executing a tox-run a pickle file will be created. If the docs are
built after the py3 task, it will fail due to incompatible
pickle-protocols.
See https://stackoverflow.com/a/25843743/4244236 for reference.
* add a method to check barcode code format
ensure that the code to print is compatible with the ESC/POS formats and
also automatically check this format before printing (barcode() method).
* rewrite test using pytest's parametrize functionality
* add test for the 'check' argument
* update authors list
The feature use_coverage of hypothesis caused the failing tests, because
the printer_file_test is sensitive to the coverage analysis of
hypothesis.
Fixed by disabling use_coverage for the crashing tests
hypothesis introduced a regression in 3.29.0 (or at least changed
behaviour). Until I have found the problem I will pin it to the last
working version.
Also two tests should be prevented from failing when they are slow.
This was tested on ZJ-5890 with success. By default centering is
deactivated for backward compatibility. Trying to center a QR code in
native mode will raise an exception as we do not know ATM if the native
rendering is centered by default or not.
* Added basic tests for center feature
* Check image size before centering
On a RaspberryPi it's taking 10 seconds to simply run:
import escpos.printer
This change creates a pickle file that will load 20x faster. The
rationale is that the capabilities.json file doesn't change too often.
Also changed some imports for PEP8.
* Example Weather forecast script
Used Adafruits example as base and adapted it for python-escpos
Weather icons taken from
http://adamwhitcroft.com/climacons/
* Weather Icons from Adam Whitcroft
Weather Icons from http://adamwhitcroft.com/climacons/
* update authors
* Minor improvements
* Weather Script Debugged
Added one more Icon
Attributed Icons in readme.md
changed folder structure
* Change formatting
* Fixed pathing to graphics issue
* fixed image size
* autopep8 to clean up the code
The DLE EOT command allows querying the status of several features of
the printer.
Added to the online/offline status developed in #237, this commit adds a
paper sensor querying.
Tested with an Epson TM-T20II, which only has an end-paper sensor. The
near-end paper sensor should be tested with a compatible printer.
However, the implementation is quite straight-forward.
The changes done in this commit should help with the open issues:
#5, #27 and #161.
The old implementation lacked the NUL char at the end of the command, as
defined on the Epson ESC/POS Reference Guide (see
https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=53
). Also, the horizontal tab control character (CTL_HT) shouldn't be
there.
This implementation allows setting up to 32 tabs with a given tab width.
Both values are checked to be in the valid ranges defined on the guide.
Also, the TabPosError exception text has been rewritten to define the
stated above.