equal
deleted
inserted
replaced
30 import optparse |
30 import optparse |
31 import os |
31 import os |
32 import re |
32 import re |
33 import sys |
33 import sys |
34 |
34 |
35 # Python 3 adapters |
35 |
36 ispy3 = sys.version_info[0] >= 3 |
36 def iterbytes(s): |
37 if ispy3: |
37 for i in range(len(s)): |
38 |
38 yield s[i : i + 1] |
39 def iterbytes(s): |
|
40 for i in range(len(s)): |
|
41 yield s[i : i + 1] |
|
42 |
|
43 |
|
44 else: |
|
45 iterbytes = iter |
|
46 |
39 |
47 |
40 |
48 def visit(opts, filenames, outfile): |
41 def visit(opts, filenames, outfile): |
49 """Process filenames in the way specified in opts, writing output to |
42 """Process filenames in the way specified in opts, writing output to |
50 outfile.""" |
43 outfile.""" |