diff options
author | Guido van Rossum <guido@python.org> | 1992-08-25 12:31:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-08-25 12:31:03 (GMT) |
commit | 354166fa0557c0873100890a0e0ad70a6e33e68c (patch) | |
tree | 77abb313177ada16b283713440321e086cc85670 /Lib/irix5 | |
parent | 9022fceae814a3099d8678c662e541f0caeb0026 (diff) | |
download | cpython-354166fa0557c0873100890a0e0ad70a6e33e68c.zip cpython-354166fa0557c0873100890a0e0ad70a6e33e68c.tar.gz cpython-354166fa0557c0873100890a0e0ad70a6e33e68c.tar.bz2 |
Changed to use regex directly instead of regexp.
Diffstat (limited to 'Lib/irix5')
-rwxr-xr-x | Lib/irix5/flp.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/irix5/flp.py b/Lib/irix5/flp.py index fcc95f0..39b45dc 100755 --- a/Lib/irix5/flp.py +++ b/Lib/irix5/flp.py @@ -250,12 +250,13 @@ _parse_func = { \ # This function parses a line, and returns either # a string or a tuple (name,value) -import regexp +import regex +prog = regex.compile('^\([^:]*\): *\(.*\)') def _parse_line(line): - a = regexp.match('^([^:]*): *(.*)', line) - if not a: + if prog.match(line) < 0: return line + a = prog.regs name = line[:a[1][1]] if name[0] == 'N': name = string.joinfields(string.split(name),'') |