1717 ...
1818
1919"""
20- from __future__ import (absolute_import , division , print_function ,
21- unicode_literals )
20+ from __future__ import absolute_import , division , print_function
2221
2322import six
2423from six .moves import xrange
@@ -764,13 +763,13 @@ def __init__(self, filename):
764763 with open (filename , 'rb' ) as file :
765764 header1 = file .read (24 )
766765 lh , bc , ec , nw , nh , nd = \
767- struct .unpack (str ( '!6H' ) , header1 [2 :14 ])
766+ struct .unpack ('!6H' , header1 [2 :14 ])
768767 _log .debug (
769768 'lh=%d, bc=%d, ec=%d, nw=%d, nh=%d, nd=%d' % (
770769 lh , bc , ec , nw , nh , nd ))
771770 header2 = file .read (4 * lh )
772771 self .checksum , self .design_size = \
773- struct .unpack (str ( '!2I' ) , header2 [:8 ])
772+ struct .unpack ('!2I' , header2 [:8 ])
774773 # there is also encoding information etc.
775774 char_info = file .read (4 * (ec - bc + 1 ))
776775 widths = file .read (4 * nw )
@@ -779,7 +778,7 @@ def __init__(self, filename):
779778
780779 self .width , self .height , self .depth = {}, {}, {}
781780 widths , heights , depths = \
782- [struct .unpack (str ( '!%dI' ) % (len (x )/ 4 ), x )
781+ [struct .unpack ('!%dI' % (len (x )/ 4 ), x )
783782 for x in (widths , heights , depths )]
784783 for idx , char in enumerate (xrange (bc , ec + 1 )):
785784 byte0 = ord (char_info [4 * idx ])
@@ -1040,7 +1039,7 @@ def find_tex_file(filename, format=None):
10401039 if isinstance (format , bytes ):
10411040 format = format .decode ('utf-8' , errors = 'replace' )
10421041
1043- cmd = [str ( 'kpsewhich' ) ]
1042+ cmd = ['kpsewhich' ]
10441043 if format is not None :
10451044 cmd += ['--format=' + format ]
10461045 cmd += [filename ]
0 commit comments