[wingide-users] Rescan installed modules?

Joshua J. Kugler joshua at eeinternet.com
Mon Dec 8 02:10:30 MST 2008


On Sunday 07 December 2008, Wingware Support said something like:
> Joshua J. Kugler wrote:
> > I searched the list archives, let me know if my google-foo was
> > lacking.
> >
> > Is there a way to rescan sys.path for new modules?  Sometimes I
> > install modules while WingIDE is running, and it would be nice to
> > have access to auto-complete for those modules without having to
> > restart WingIDE.
> >
> > Is the feature already there and I missed it?  If not, I'd vote for
> > it! :)
>
> It should be picking up on new modules if you add them somewhere
> on the Python path.  I just tried it by creating yyy.py in my Python
> install's site-packages and it showed up in the auto-completion list
> for 'import y|' (| is caret).  This worked both in the editor and
> the Python Shell.
>
> Is this not working for you?  If not, what Wing version is it?  Or is
> it something else you're expecting to happen that is not working?

Maybe it had to do with the fact that the module was already mentioned 
in the file I was editing.  I was editing a file in a project that had:

import cherrypy

I realized I didn't have it installed, and so installed it.  After that,

cherrypy.|

still produced "Cannot determine type."  I also looked for the reanalyze 
file menu option, but didn't see that.  Should I have been able to get 
an autocomplete list in this case?

Ah yes, I verified that if the module is already mentioned in an import, 
and THEN you add the module in the sys.path, it won't see it.  If you 
delete and replace the line that imports the module (a simple Ctrl-X, 
Ctrl-V will do) it will be able to see the contents of the module.

Sorry for the noise if that is expected behavior.

Wing 3.1.5-1 in Python 2.5 on Ubuntu Hardy.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE


More information about the wingide-users mailing list