summaryrefslogtreecommitdiff
path: root/numpy/numarray/alter_code1.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-09-21 00:02:22 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-09-21 00:02:22 +0000
commit3e47b2420c722cbb61250d816424617603cbc718 (patch)
tree3451b90e4ddae8033c55dc9e25c1b84d9ab60fa8 /numpy/numarray/alter_code1.py
parentb1d84f913bac076fae745e09d77314dc5a3b6df0 (diff)
downloadnumpy-3e47b2420c722cbb61250d816424617603cbc718.tar.gz
Fix problem with alter_code1.py
Diffstat (limited to 'numpy/numarray/alter_code1.py')
-rw-r--r--numpy/numarray/alter_code1.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/numarray/alter_code1.py b/numpy/numarray/alter_code1.py
index f9dcf4a44..4a62324fc 100644
--- a/numpy/numarray/alter_code1.py
+++ b/numpy/numarray/alter_code1.py
@@ -69,7 +69,7 @@ def changeimports(fstr, name, newname):
if ('.' in name):
name_ = name.replace('.','_')
- 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_))