1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

improve doc, improve codepage_tables.py

This commit is contained in:
Patrick Kanzler
2017-01-29 23:36:33 +01:00
parent e904500312
commit e4a21e94fc
4 changed files with 30 additions and 8 deletions

View File

@@ -208,14 +208,20 @@ class MagicEncode(object):
If the printer does not support a suitable code page, it can
insert an error character.
:param encoding: If you know the current encoding of the printer
when initializing this class, set it here. If the current
encoding is unknown, the first character emitted will be a
codepage switch.
"""
def __init__(self, driver, encoding=None, disabled=False,
defaultsymbol='?', encoder=None):
"""
:param driver:
:param encoding: If you know the current encoding of the printer
when initializing this class, set it here. If the current
encoding is unknown, the first character emitted will be a
codepage switch.
:param disabled:
:param defaultsymbol:
:param encoder:
"""
if disabled and not encoding:
raise Error('If you disable magic encode, you need to define an encoding!')