From f54a116f84b82b4679dd803728d2fa08491ea613 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Tue, 19 Sep 2006 08:44:44 +0000 Subject: Add one more import possibility. --- numpy/oldnumeric/alter_code1.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/oldnumeric/alter_code1.py') diff --git a/numpy/oldnumeric/alter_code1.py b/numpy/oldnumeric/alter_code1.py index 662b589f5..85d0a3436 100644 --- a/numpy/oldnumeric/alter_code1.py +++ b/numpy/oldnumeric/alter_code1.py @@ -77,6 +77,8 @@ def changeimports(fstr, name, newname): fromstr = 'from %s import ' % name fromall=0 + fstr = re.sub(r'(import [^,]+,\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