[wingide-users] 2.0.0-b4 - Searching and Code Inspection
Ian J Cottee
ian at cottee.org
Wed Jul 7 02:33:54 EDT 2004
> Did you make sure the "Recursive" option is checked in the Options
> popup? Assuming it is and the path is right, if it still fails to
> search, please submit a bug report from the Help menu and check
> on the "Include error log" option. That might contain some clues
> as to what's going on.
My oops :). Sorry - this is fine.
> (I've just changed the default for Recursive to True since that's
> probably what most people expect, but it was False in 2.0b4)
Yes - if I wanted to cling onto some self respect I do confess that I
assumed the default would be that but I missed the option. Checking it
> > On a related note, as I am currently testing with Plone development I
> > was hoping WingIDE 2 would help me in working out where code is being
> > called from. I have added my own Plone product files as the only files
> > in my project. My Python path reads
> > "/usr/local/zope/sites/plone/Products" which I was hoping would mean
> > that WingIDE2 would automatically be aware of all the CMF and Plone
> > stuff hanging around in there. Now if I have a line at the top of my
> > source file which reads
> > from Products.CMFCore.utils import getToolByName
> > I would expect to be able to click on the actual call to getToolByName,
> > choose Goto Definition and the IDE to open up Products.CMFCore.utils at
> > the appropriate line. Should this be possible and am I going around
> > things the wrong way?
> I think you need your path to be /usr/local/zope/sites/plone instead,
> at least that should fix the import you list above. It's going to look
> for Products.CMFCore.utils starting from directories on the path so
> you don't want the trailing "Products" listed.
Strangely I had that path before at one point and had changed it whilst
playing around. Changed it back to your suggestion but still having
problems. I can jump to definitions contained in the current directory.
I can also jump to definitions for Modules on my normal PYTHONPATH. e.g.
StringIO. But anything else within Products it can not see.
Show Analysis Stats shows the /usr/local/zope/sites/plone folder as
being on my path (and also shows
/usr/local/zope/sites/plone/Products/MySite which is the project
directory I am working in). I can find stuff in MySite but not
> You will want to add a few more things like /usr/local/zope/sites/lib/python
> to the path so Wing can also find the other Zope internals.
Added that and I can now get definitions for Zope internals (thanks :))
but items in Products are no go. Hmmmm ... it may well be operator
error. Is there a way to force the source code analysis?
> BTW, another way to understand Zope internals is to run in the debugger,
> set breakpoints, and go up and down the stack. This gets you information
> about the call relationships very quickly.
Many thanks Stephan. I'm a committed Emacs user but keep feeling I could
be unfaithful for the pleasure of proper code completion and easier
debugging. I've downloaded trial versions upteen times but this time I
am working through a lot of Plone stuff and trying to do as much as
possible in WingIDE for the next 10 (well, 9 now :) ) days.
Many thanks again
More information about the wingide-users