0

So, I have some C++ libraries that I want to use with python; they are compiled into a series of .so files, and I can import them just fine. The wrappers from C++ to python for these .so files are generated by SIP.

I like to use Emacs as a development environment, however, and features such as autocomplete and correct detection of includes and so on and so forth don't work. I notice, however, that other IDE's correctly display the autocompletion information that is available from the module. I don't know how to get that information into emacs, and I currently don't know how the other IDE's are getting it (perhaps inspecting the extension module?).

Basically, the information that I want is what is available to the user from the interpreter level when the module is loaded, and then help is called on what that module exports via the SIP wrapper that was generated.

I'm not sure if SIP is something that will generate a .py file from the .sip files that I have for the library that I'm using, but if that's what it is, then I'd be glad if someone told me, because I sure looked.

First edit

I'm using emacs Semantic tool from the CEDET package. In my .emacs, I have two lines adding the environment variables PYTHONPATH and LD_LIBRARY_PATH with setenv, so that when spawning a python shell under emacs to control the process, it can pick up these external libraries. I have the same corresponding directories available to semantic through some calls to set semantic-python-dependency-system-include-path.

Second edit I found out how the library that I'm using is providing it's gui with the autocompletion support and syntax checking information that it has. There is a .api file that it's loadin, here's a sample of what that .api file contains:

tulip.tlp.EDGE_TYPE?10 tulip.tlp.DIRECTED?10 tulip.tlp.INV_DIRECTED?10 tulip.tlp.UNDIRECTED?10 tulip.tlp.ElementType?10 tulip.tlp.NODE?10 tulip.tlp.EDGE?10

Here's a gist with the rest of the .api file!

What do I do to make emacs see what functions are exposed by the SIP-generated wrapper?

Adam Miller
  • 1,756
  • 1
  • 25
  • 44
  • I don't know the answer, however, you may want to clarify whether or not you are using `ropes` library to do the autocompletion in Python code. and if that's the case, maybe you need to look through their documentation / code to see how they gather the information about the code. –  Jul 30 '13 at 13:05
  • no, I'm using emacs Semantic tool from CEDET... i'll add that – Adam Miller Jul 30 '13 at 17:29

0 Answers0