[wingide-users] TurboGears relative imports

Wingware Support support at wingware.com
Mon Sep 29 15:09:12 MDT 2008


Mike Driscoll wrote:
> Is the WingIDE supposed to support relative imports? The reason I ask is 
> that it doesn't seem to like it much. I am working through the 
> TurboGears 2.0 wiki tutorial and when I try to do this:
> 
> from wiki20.model import DBSession
> 
> None of the code completion works on these objects. You can find the 
> example here: http://turbogears.org/2.0/docs/main/Wiki20/wiki20.html  In 
> this case, the DBSession variable is a SQLAlchemy session object, so it 
> should have save, append, commit and other methods.
> 
> It's not a big deal, just unexpected. Thanks,

This form of import should work.  It could be you need to add the directory
that contains wiki20 to your Python Path in Project Properties.  It's also
possible the DBSession object is opaque to our static code analyzer for
some reason.  If adding to the path doesn't help, try typing "DBSession."
and then submitting a bug report from Wing's Help menu with the error log
included.

Also, I'm assuming you're using Wing 3.1.4; if not, you want want to try
upgrading also.

Thanks,

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com



More information about the wingide-users mailing list