Python

Python support in NetBeans

This project is a community-driven effort. Oracle does not actively participate in or directly support this effort.


If you are using NetBeans 8.1, you can access the plugin directly from the IDE 8.1 Tools->Plugin menu. See also the Python 8.1 plugin page
This plugin ONLY works with IDE 8.1. For questions and comments, log on to forums.nbPython.org

If you are using NetBeans 8.0.2, you can Get started with Python in NetBeans IDE 8.0.2

For ALL other ways to install Python in NetBeans, see the PythonInstall page.

Visit the Python Project wiki page! We are looking for volunteers to help with testing and coding!

Contents


Getting Started

Important links

Mailing lists

There are several mailing lists serving different purposes:

  • For Using the NetBeans Python plugin, use the nbpython@netbeans.org mailing list (subscribe, unsubscribe, archives)
  • For Developing the NetBeans Python plugin, use the nbpython-dev@netbeans.org mailing list (subscribe, unsubscribe, archives)
  • To track issues, use the nbpython-issues@netbeans.org mailing list
  • To be notified about commits, use the nbpython-commits@netbeans.org mailing list

Features

Code completion

Code completion is available for

  • Local variables
  • Other known classes and functions
  • Keywords

In addition, documentation is shown when available.

Image:code-completion_Python.png

Smart Indent, Outdent, and Pair matching

Pressing the return key will indent or outdent in a smart fashion. Matching for (), [[ | ]], , and "" is supported.

Image:pair-matching_Python.png

Editor Hints

Editor hints provide the capability to dynamically check the syntax and the semantics of your python code.

Detailed descriptions of the available python hints are available in this document.

http://wiki.netbeans.org/wiki/attach/PythonHints/circularredundancy.png

Code Folding

Classes, methods, functions, and triple quoted strings can be folded to conserve screen real estate and reduce clutter.

Unfolded code:

Image:unfolded-code_Python.png

Folded code:

Image:folded-code_Python.png

Semantic highlighting

Syntax highlighting reflects the semantics of the program: local and global variables are colored appropriately (and differently)

Image:semantic-highlighting_Python.png


Mark Occurrences

Placing the caret on a variable shows other uses of the variable. Placing the caret on a function or method call shows other calls to the function or method.

(Note - this screenshot is a bit old, and the bug shown here (the scope of name incorrectly includes for example the parameter in the nested function "withversion") has been fixed)

Image:mark-occurrences_Python.png


Debugger

The debugger is derived from Jean-Yves Mengant's jpydbg debugger. A primer is available here at : http://wiki.netbeans.org/nbpythondebuggerprimer

Image:debugger-local-variables_Python.png

Image:debugger-command-prompt_Python.png

Multi-threaded debugging: http://jpydbg.blogspot.com/2009/01/jpydbg-mutithreaded-python-debugger.html

Python Platform Manager

The Python platform manager lets you specify which Python runtime (CPython or Jython) you wish to use. You can control which CPython is used, as well as specifying values for command line arguments. It is also possible to set the PYTHONPATH variable to set the Python load path.

Image:platform-manager_Python.png


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo