fixed numpy bugs, that made it impossible to use complete numpy (including regression tests)

This commit is contained in:
David Halter
2012-07-29 20:56:54 +02:00
parent 1a981a3d67
commit 163b0c0f9d
2 changed files with 16 additions and 2 deletions

View File

@@ -90,7 +90,9 @@ class Parser(CachedModule):
@property
def module(self):
if not self._module:
self.sys_path.insert(0, self.path)
if self.path:
dir = os.path.dirname(self.path)
self.sys_path.insert(0, dir)
temp, sys.path = sys.path, self.sys_path
# TODO reenable and check (stackoverflow question - pylab builtins)
@@ -99,7 +101,9 @@ class Parser(CachedModule):
self.sys_path, sys.path = sys.path, temp
if self.path:
self.sys_path.pop(0)
self._module = self._content['module']
#print 'mod', self._content['module']
return self._module

10
test/completion/thirdparty/pylab.py vendored Normal file
View File

@@ -0,0 +1,10 @@
import pylab
pylab.
import numpy
#? ['array2string']
numpy.array2string
#? ['shape']
numpy.matrix().shape