Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code completion in NetBeans' python plugin does not work properly

I am asking on StackOverflow because surely I am doing something completely silly and I hope S.O. might provide me with a quick answer. I've installed the latest stable Python-plugin for NetBeans. It works great, and I tested code completion with various packages such as sys, os and so on. It works beautifully.

However, it does not seem to pick up the code completion for the code in my own project.

I created a package called mypackage (it has __init__.py as well), and in it I have a module called mymodule.py. Inside mymodule I've put a class called MyClass, complete with doc-strings and all.

Please refer to this screenshot to describe what happens in code-completion: alt text http://rasterburn.org/~sgt/stuff2/pythonproblem.png

As you see, it's suggesting irrelevant things, as opposed to just MyClass. (Note that if I execute mymodule.MyClass() it works 100%, it's just that I would really like code completion on my own code)

Hope I'm just doing something silly here... Any ideas?

like image 451
Torbjørn Kristoffersen Avatar asked Oct 15 '22 07:10

Torbjørn Kristoffersen


1 Answers

I'm afraid to tell you that this is a Known Bug for over a year. Some people have suggested that it seems the Python development in NetBeans is stalled.

Personally, I'm using Eclipse. PyDev is still under active support, and the auto-completion is smart. In addition, it supports more variety in syntax-highlighting. (This is my personal configuration.)

I would recommend you switch to another IDE while you can. If you're using Jython, let me know how that works out for you. Share with us your solution when you have one. =]

Related topic:

Has anyone tried NetBeans 6.5 Python IDE?

like image 192
Xavier Ho Avatar answered Oct 27 '22 09:10

Xavier Ho