Commit Graph

23 Commits

Author SHA1 Message Date
Patrick Kanzler ed8ec0788a start with type annotation 2020-11-08 23:45:25 +01:00
Patrick Kanzler ff39908674
Merge branch 'master' into 390-add-spellcheck-to-sphinx 2020-05-11 23:45:34 +02:00
Patrick Kanzler f4e214ad17 add spellchecker with first conf, fix some errors 2020-05-11 23:39:56 +02:00
Patrick Kanzler b9e3827867 use pkg_resources
This change uses if no path for e capabilities-file is supplied a
temporary file created by pkg_resources, which should be more robust
than directly accessing the file. (This failed sometimes, for example
in zipped distributions or uncommon structures)
2020-05-11 22:54:22 +02:00
Justin Vieira 91ff83e506 Update to use pyyaml safe_load(), as load() is unsafe and disabled on some systems 2019-05-29 16:43:19 -04:00
Patrick Kanzler 6c94f88c24
improve platform independence (#296)
* add os.devnull for platform independence

fixes #288

* add test for soft_barcode

* open devnull as binary

* add version identifier to pickle
2018-05-15 01:03:07 +02:00
Patrick Kanzler 47b4d41b28
use package for tempdir
cherry-picked from 8494cca526 in #274
2018-05-13 18:52:39 +02:00
Thijs Triemstra 6e09fd1e97 fix typo 2018-04-26 07:22:37 +02:00
Patrick Kanzler 44f01a212b fix docs failing due to pickle protocol in mixed env
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.
2017-10-08 21:08:13 +02:00
Sergio 50c627fbb0 Pickling capabilities for faster start up times. (#252)
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.
2017-08-31 09:07:26 +02:00
Sam Cheng a0ef820947 add support for an ESCPOS_CAPABILITIES_FILE environment variable. This is useful in situations where package structure is changed, such as using cx-freeze 2017-03-27 14:39:49 +02:00
Patrick Kanzler c48a0bee51
use not in instead of not ... in 2017-01-30 00:50:58 +01:00
Patrick Kanzler c2fc464c55
reformat PEP8 and similar issues 2017-01-30 00:10:14 +01:00
Patrick Kanzler e4a21e94fc
improve doc, improve codepage_tables.py 2017-01-29 23:36:33 +01:00
Michael Billington 9a65945fcd re-work encoder to consult the capabilities database and use custom code pages or python encoder as necessary 2016-09-11 21:03:55 +10:00
Michael Elsdörfer c3e3ec5808 Merge branch 'capabilities' into text-encoding 2016-08-30 18:02:40 +02:00
Michael Elsdörfer c850a726cb Fix docstring warnings from QuantifedCode. 2016-08-30 17:55:58 +02:00
Michael Elsdörfer 2f89f3fe3a Port to current version of escpos-printer-db. 2016-08-30 17:08:27 +02:00
Michael Elsdörfer 58ea206c36 Avoid mutable default argumet. 2016-08-30 16:13:38 +02:00
Michael Elsdörfer b92eeed50b Add tests for the profile. 2016-08-30 13:27:48 +02:00
Michael Elsdörfer 5fa89ff685 Automatically choose correct barcode function.
Tests for barcode function.
2016-08-30 13:02:58 +02:00
Michael Elsdörfer a07f84a5bc Match the current printer-db format. 2016-08-30 12:26:09 +02:00
Michael Elsdörfer a8574ad9d7 Support loading capabilites YAML into Python classes. 2016-08-26 10:41:01 +02:00