[wingide-users] TurboGears relative imports

Mike Driscoll mdriscoll at co.marshall.ia.us
Tue Sep 30 06:56:57 MDT 2008


Stephan

I am indeed using Wing 3.1.4. I apologize for not mentioning that. I 
went to my Project Properties and in the Environment tab I changed the 
Python Path to include my directory. Now DBSession has some code 
completion, but Wing seems to think it's some other kind of object. It's 
not showing the right methods at any rate. I'll submit a bug report.

Thanks,

Mike

> 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,
>



More information about the wingide-users mailing list