[wingide-users] editor code completion (numpy)
support at wingware.com
Thu Oct 2 08:58:53 MDT 2008
Gabriel Gellner wrote:
> Well so far I am simply blown away by this program (a good IDE is the final thing I missed moving from matlab) . . . as I begin to save my pennies for the big purchase, I notice a strange problem with completion of some numpy functions (though I am sure this is not limited to numpy, I just use this a lot ...).
> when I type:
> I don't get 'uniform' being completed (but I do get a bunch of completion within numpy). As this method alias is defined in a C extension I am not entirely surprised, but I thought wing would do module introspection in the background (it is turned on in the preferences) to at least get the name (which of course works in the wing python interpreter). No matter how long I wait (and the status bar suggests it has stopped introspecting) this does not work.
> This is not the end of the world, as I imagine I can write a simple program to create some .pi files for these libraries, but if it can be done automagically, I would continue my general feeling of awe... Any tips would be greatly appreciated.
Tracing this through it looks like ultimately 'uniform' is loaded in
the mtrand.py module using the imp module in a way Wing's static
analysis engine cannot understand. Normally Wing would find and
scrape symbols out of the extension module but since we don't execute
code we can't see through calls to imp.load_dynamic like this one.
Note this does work in the Python Shell because there Wing is inspecting
the live runtime state. Working there, or in the Debug Probe, is often
a good way to get the most accurate completions.
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users