NetBeans Screenshot of the Week #36: Python Code Completion


Here are some screenshots of the code completion working for Python.
First, let's try it from an import statement:







Note that the documentation for the module is shown. Next, let's
try completing on imported symbols - again we've got the documentation:







I'm writing a unit test, extending TestCase. Now let's try overriding
some methods - completion after typing def:







Obviously, invoking methods on self. will show the inherited
methods - and their documentation:







Here's completion in my function (not on self) showing
the local variables, imported symbols and builtins. Notice that deprecated
methods are marked with strikethrough (and deprecated modules are in imports
as well, though I didn't show that above).







Notice also that the documentation here looks better - it has links,
colors, etc. This is because NetBeans supports the reStructuredText
Docstring Format (see PEP 287).
System libraries are being documented in this way now, so more of the
documentation will start looking like this.



When NetBeans finds embedded code, it will also syntax highlight the
code fragments in the documentation:







You can use this in your own documentation as well obviously.
Here's a file where I have restructured text. As I'm writing it,
I can -immediately- preview the text myself by just pressing
Ctrl-Shift-Space (Show Documentation - for those who don't know, you
can do this on regular code as well if you want to just get the documentation
for the code at the caret, rather than completion alternatives up to
the caret prefix.)







Here's a final example - completion after raise (or
exception) will show completion for all Error
classes:






I'll be quiet or about a week now -- I'm going on vacation! Not great
timing given the release date, but this has been planned since February...

Comments:

Have fun and relax, I'm tracking the Python plugin with mercurial and it works extremely well! You've accomplished more than a lot of other IDE's in a very short time.

Posted by Fabio Corneti on November 14, 2008 at 06:19 AM PST #

Tor,

I bet this is a difficult time to be at Sun. I hope things work out for the folks who fall victim to the layoffs. Try to keep your spirits up and remember that the work you do makes a difference to more people than you can know.

I am glad to see you doing these screenshots of the week again. I always looked forward to the Ruby ones of the past.

Posted by Mario Aquino on November 14, 2008 at 11:45 AM PST #

This is fantastic. I want to do some Python programming now that Python 3 is coming. It's great to be able to use the same IDE I use for Java and Ruby.

Posted by Markus Jais on November 14, 2008 at 07:58 PM PST #

Good day, Tor! I've found a bug in NetBeans 6.5 ruby edition - when I type "H#so" in Go To Type - I don't see there Hash#sort - but 6.1 shows it well.

Posted by ruby.freeman on November 19, 2008 at 04:46 PM PST #

Hey Tor,

Firstly: I really, really, really love netbeans!

That said, is there a file somewhere in the compiled binary - deep in a jar somewhere for example - that I can remove to break any semblance of the auto-completion popup? It regularly, intermittently starts working despite my disabling it through options and insists on popping up every time I hit '.' in my source files :)

No worries if you don't know off the top of your head which file(s) to rm, but I thought I'd throw it out there in the hopes that you could help me out! Using Netbeans 6.5 FINAL, btw...

[It didn't seem like the bug tracker would be the right place to ask as I'm keen to just break it :)]

Cheery-O!

Posted by Gustav Paul on November 24, 2008 at 05:14 AM PST #

hey, Gustav! Try to enable those options (autocompletion, etc), and then disable them - it works for me

Posted by ruby.freeman on November 24, 2008 at 03:59 PM PST #

Post a Comment:
Comments are closed for this entry.
About

Tor Norbye

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today