[wingide-users] Dynamic import paths
Wingware Support
support at wingware.com
Tue Oct 11 12:22:17 EDT 2005
Russell Warren wrote:
> When working with code located in multiple directories I often have code like this:
>
> from sys import path as sys_path
> if "../Common" not in sys_path: sys_path.append("../Common")
> import ModuleName #this is in ..\Common
>
> Right now when I do this I do not get code completion for ModuleName at all.
>
> Is there any work around for this? If not, it would be nice if Wing could pick up on additions to sys.path with the code completer. Making it smart enough to see through from statements like in my example, or aliasing of sys, would be extra nice.
Currently all directories must be in the python path in the project
properties (or the file properties for a the main debug file). Wing
does not scan code for modifications to sys.path. The above example
would be difficult to comprehend because it uses a relative path.
John
More information about the wingide-users
mailing list