[wingide-users] Problem with auto-complementation in OpenCV

Wingware Support support at wingware.com
Mon Apr 13 10:49:02 MDT 2009


Piotrek wrote:
> I have oryginaln problem with autocomplementation in WingIDE working 
> with OpenCV library. Auto-comp works fine in Python Shell.
> writing:
> 
> from opencv.cv import *
> from opencv.highgui import *
> img = cvLoadImage('/tmp/image.jpg')
> img.    
> 
> I get a list of function connected with img.
> This same piece of code in editor don't tell me nothing about img, in 
> Source Assistant I get a information: "Symbol: img Cannot determine type".
> Where is the mistake? Why script doesn't know what the img is?

Wing's shell uses live runtime state to offer auto-completion while
in the editor you get completion sourced from static analysis.

It looks like the opencv.cv.* modules are written in C++.  Wing should
try to load and "scrape" interface information out of the extension
modules, but it's possible either it's failing to do that or you
need to add the directory that encloses the package directory opencv
to your Python Path in Wing's Project Properties.

If you check your Python Path and it still does not work, try this:  Quit
and restart Wing, and then try the above in the source editor, then submit
a bug report from Wing's Help menu with the error log included.  That
may show us what errors are occurring when trying to load the modules.

It's also worth trying something like these to rule out problems specific
to the form of import:

import opencv
opencv.cv.

from opencv import cv
cv.

Please let us know whether or not that helps.

Thanks,

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com



More information about the wingide-users mailing list