diff --git a/examples/codepage_tables.py b/examples/codepage_tables.py index e19ea3f..e638b3c 100644 --- a/examples/codepage_tables.py +++ b/examples/codepage_tables.py @@ -15,7 +15,7 @@ def main(): for codepage in sys.argv[1:] or ['USA']: dummy.set(height=2, width=2) - dummy._raw(codepage+"\n\n\n") + dummy._raw(codepage + "\n\n\n") print_codepage(dummy, codepage) dummy._raw("\n\n") @@ -36,14 +36,14 @@ def print_codepage(printer, codepage): # Table header printer.set(text_type='B') - printer._raw(" %s\n" % sep.join(map(lambda s: hex(s)[2:], range(0,16)))) + printer._raw(" {}\n".format(sep.join(map(lambda s: hex(s)[2:], range(0, 16))))) printer.set() # The table - for x in range(0,16): + for x in range(0, 16): # First column printer.set(text_type='B') - printer._raw("%s " % hex(x)[2:]) + printer._raw("{} ".format(hex(x)[2:])) printer.set() for y in range(0,16):