Re: State of Python

Eric Ludlam <[email protected]> Thu, 29 Jan 2015 19:27:16 -0500
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
Hi,

Each language needs to tweak support for smart completion depending on 
how different it is from a strongly typed langauge like c++.  Even so, 
getting support for includes and symbol lookup sometimes takes extra 
work.  Semantic's python support does know how to look up includes by 
calling out to python, and tweaking the imported name.

It doesn't know how to get local variable, or several other local 
parsing operations.

So I'll take a guess that the smart completion engine is basically 
missing some simple stuff to get it over various hurdles for looking up 
data types from symbols.

There is no test file for python in tests/cedet/semantic/tests that 
would work with ia-utest.el.   I've never worked with python so I don't 
know what to look for to help out here.

Eric


On 01/21/2015 08:07 AM, RJD wrote:
> I have some tests wrote in Python and would like to start developing tests.
>>From what I have gathered the latest cedet (I have the latest git version ~~
> 17th Jan 2015) should work straight of the box with python?
>
> Again, I do not use EDE but run a hook function if the py file matches a
> certain path. When I open the py file semantic loads everything and the hook
> seems to work because global-decoration-mode does not highlight anything.
> The hook looks something like this:
>
> (semantic-add-system-include "c:/dir/dir1/dir2/py_libs/").
>
> Anyway, semantic seems to be able to complete symbols in the current buffer,
> but if I have something like the following:
>
> import LIB1.module1 as as_module
>
> myUnTypedVar = as_module. # this does not work.
>
> But, later on in the file completion works for:
>
> myUnT # completes to the current buffer var.
>
> So it seems that code completion is not seeking the included modules.
>
> When I run bovinate I get something like:
>
> (("LIB1.module1" include nil
>   (unlink-hook
>   (semantic--tag-unlink-secondary-overlays)
>   secondary-overlays
>   (#<overlay from 95 to 129 in model.py>)
>   dependency-file "d:/path/to/py/file/mypy.py" link-hook
>   (semantic--tag-link-secondary-overlays)
>   unlink-copy-hook
>   (semantic--tag-unlink-copy-secondary-overlays))
> #<overlay from 95 to 129 in model.py>)
> (("LIB1.module2" include nil
>
> All I see is a bunch of nils.
>


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/