Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to get code completions for compiled modules (e.g. OpenCV) #1469

Closed
spyder-bot opened this issue Feb 17, 2015 · 12 comments
Closed

Comments

@spyder-bot
Copy link
Collaborator

From davi...@gmail.com on 2013-06-27T14:42:41Z

Spyder Version: 2.2.0
Python Version: 2.7.5
Qt Version: 4.8.4, PyQt4 (API v2) 4.10.2 on Linux

What steps will reproduce the problem?

Type the following lines of code into the editor with the OpenCV 2 and python bindings installed.

import cv2
cv2. What is the expected output? What do you see instead? Expect to see dropdown list of cv2 functions. Instead nothing appears.

Please provide any additional information below

. Autocomplete works as expected in console window. All required and recommended dependencies (as listed at http://pythonhosted.org/spyder/installation.html#dependencies ) are installed. Same issue appears with previous version of OpenCV library (cv).

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1469

@spyder-bot
Copy link
Collaborator Author

From davi...@gmail.com on 2013-06-27T12:45:10Z

Issue has been previously reported here: https://groups.google.com/forum/#!searchin/spyderlib/opencv/spyderlib/AWDOyNauPbY/AhybK_hF8ZsJ

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-06-28T20:37:06Z

It's not that hard to fix but we need to create a way to let users configure a very specific aspect of our code completion machinery.

If you want to do have completion for cv2 now, please go to https://code.google.com/p/spyderlib/source/browse/spyderlib/utils/module_completion.py#274 and add to the "mods" list

Status: Accepted
Labels: -Usability -OpSys-Linux -Component-UI MS-v2.4

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-07-18T13:46:43Z

The suggested approach doesn't fix it on my system unfortunately. However, when steven.silvester was doing all the work on the jedi replacement of rope, he noticed that there was something specific about why jedi didn't pick up openCV code completion and file a bug report with the jedi devs. Maybe something similar is going on here for rope? The jedi stuff was discussed in issue #1213 .

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-08-10T18:31:59Z

issue #1512 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From bastian....@gmail.com on 2013-09-06T07:24:55Z

The suggested approach doesn't work for me, too.
I found that emacs-for-python (using ropemacs) has the same issue. A solution to that problem is posted here: gabrielelanaro/emacs-for-python#109 but I can't transfer this solution to the issue in spyder

@spyder-bot
Copy link
Collaborator Author

From oystein....@gmail.com on 2013-11-21T13:59:15Z

For me it worked to add 'cv2' to the mods variable in spyderlib/utils/module_completion.py around line 274. Afterwards I had to delete the .spyder2/db directory inside my home directory to have it rebuilt.

It would be nice if this list of modules with auto-completion enabled could be configured e.g. from the GUI (instead of having to alter the source code of Spyder)

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-11-21T14:21:28Z

I want to point out that this issue is solved by using the Jedi code completion library instead of Rope. This is ongoing work, but you can already find a very stable version in Steven's Spyder branch. See issue #1213 for more details. There are plans to merge these changes soon...

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-04-16T08:55:29Z

issue #1782 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-04-16T08:57:03Z

Summary: Add support to get code completions for compiled modules (e.g. OpenCV) (was: No OpenCV 2 autocomplete (cv2))
Blockedon: spyderlib:1213

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T09:09:33Z

This was solved when we merged support for Jedi, which will be available since 2.3.3.

Labels: -MS-v2.4 MS-v2.3.3

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T09:11:12Z

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T09:15:10Z

issue #1639 has been merged into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant