[wingide-users] 2.0.0-b4 - Searching and Code Inspection

Wing IDE Support support at wingware.com
Tue Jul 6 23:15:54 EDT 2004


On Wed, 7 Jul 2004, Ian J Cottee wrote:
> Running on Linux I can't get Batch Search Disk to work. If I search all
> the files in my project it works but if I specify a directory (in my
> case /usr/local/zope/sites/plone/Products) it doesn't seem to search for
> anything. 

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.

(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)

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

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.

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.

If that doesn't help, please let us know.

Thanks,

Stephan Deibel

--
Wingware
Wing IDE for Python
Advancing Software Development

www.wingware.com


More information about the wingide-users mailing list