[wingide-users] auto-complete module without import it

Wingware Support support at wingware.com
Thu Jan 15 07:26:16 MST 2009

Stephen Makumbi wrote:
> I would like to know if it is possible for me to have auto-completion on 
> a python module without having it imported in my source with the python 
> ‘import’ directive.

Do you mean importing the module instead w/ the imp module (or some other
way) or just referencing it out of the blue?

The latter will not work because Wing only offers what it thinks are correct
auto-completions and will not show completion on a symbol that is not
defined in your source.  If this is what you mean, however, perhaps the
Source Browser in Wing Pro is what you're looking for, as far as exploring
modules and classes?

If you mean importing w/ imp or some other way (other than 'import') you
may be able to add something like this:

if 0:
   import mymodule
   import mymodule as somename

Then you would need to make sure Wing's source analyzer can find mymodule,
which would mean adding its location to the Python Path configured in
Project Properties.

I'm not sure I'm answering your question, however, so please let me know
if this does not help.



Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list