From 3e47b2420c722cbb61250d816424617603cbc718 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Thu, 21 Sep 2006 00:02:22 +0000 Subject: Fix problem with alter_code1.py --- numpy/oldnumeric/alter_code1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/oldnumeric') diff --git a/numpy/oldnumeric/alter_code1.py b/numpy/oldnumeric/alter_code1.py index 85d0a3436..73878de3f 100644 --- a/numpy/oldnumeric/alter_code1.py +++ b/numpy/oldnumeric/alter_code1.py @@ -77,7 +77,7 @@ def changeimports(fstr, name, newname): fromstr = 'from %s import ' % name fromall=0 - fstr = re.sub(r'(import [^,]+,\s*)(%s)' % name, + fstr = re.sub(r'(import\s+[^,\n\r]+,\s*)(%s)' % name, "\\1%s as %s" % (newname, name), fstr) fstr = fstr.replace(importasstr, 'import %s as ' % newname) fstr = fstr.replace(importstr, 'import %s as %s' % (newname,name)) -- cgit v1.2.1