summaryrefslogtreecommitdiffstats
path: root/Lib/lib-old/grep.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-old/grep.py')
-rw-r--r--Lib/lib-old/grep.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib-old/grep.py b/Lib/lib-old/grep.py
index 210f9f0..767498b 100644
--- a/Lib/lib-old/grep.py
+++ b/Lib/lib-old/grep.py
@@ -4,14 +4,14 @@ import regexp
import string
def grep(expr, filename):
- prog = regexp.compile(expr)
+ match = regexp.compile(expr).match
fp = open(filename, 'r')
lineno = 0
while 1:
line = fp.readline()
if not line: break
lineno = lineno + 1
- res = prog.exec(line)
+ res = match(line)
if res:
#print res
start, end = res[0]