diff options
author | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
commit | 6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch) | |
tree | 5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/comparisons/regextest.py | |
parent | a8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff) | |
download | cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.zip cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.gz cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.bz2 |
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
Diffstat (limited to 'Demo/comparisons/regextest.py')
-rwxr-xr-x | Demo/comparisons/regextest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/comparisons/regextest.py b/Demo/comparisons/regextest.py index 1fab052..d2c534d 100755 --- a/Demo/comparisons/regextest.py +++ b/Demo/comparisons/regextest.py @@ -21,7 +21,7 @@ import sys import re def main(): - pats = map(chomp, sys.stdin.readlines()) + pats = list(map(chomp, sys.stdin.readlines())) bigpat = '(' + '|'.join(pats) + ')' prog = re.compile(bigpat) @@ -29,7 +29,7 @@ def main(): try: fp = open(file, 'r') except IOError as msg: - print "%s: %s" % (file, msg) + print("%s: %s" % (file, msg)) continue lineno = 0 while 1: @@ -38,7 +38,7 @@ def main(): break lineno = lineno + 1 if prog.search(line): - print "%s:%s:%s" % (file, lineno, line), + print("%s:%s:%s" % (file, lineno, line), end=' ') def chomp(s): return s.rstrip('\n') |