Tuesday Apr 28, 2009

Python and NetBeans


Introduction to Python support in NB prepared by Blanka:


"Some time ago you could notice that in the main download page new menu item appeared.

It is Python Early Access.

Python is a dynamic object-oriented programming language that can be used for many kinds of software development. You can download it by clicking on that item or is also available as a plugin for NetBeans 6.5 in Tools - Plugins.

Let's go thought creating a new project. Python is displayed as the project when only the Python EA version of the IDE has been installed on your machine. Other categories may appear if Python EA was added to the IDE as a plugin. New Project wizard offers you creating of a new python project from a template, or importing existing projects.

In the next step you enter the Project Name and select the version of Python you want to use from the drop down list. You can manage this at any time in the Properties of the project (right click on the project). Then click Finish to create the project.

Note that the project is open in the Source Editor of the IDE, displaying basic information, as seen in the following image. Netbeans IDE automatically documents the author and date of the project along with providing a short sample print "Hello" program.


The NetBeans editor for Python supports Smart Indent, Outdent, and Pair matching, additional to syntactic and semantic highlighting, code folding, instant rename refactoring, mark occurrences, finding undefined names, and Quick Fixes. Code completion is available for local function and variable names as well as Python keywords. The editor also assists you by inserting and fixing import statements.


If you want to try more than just creating the new project, you can follow Python tutorials on the netbeans pages: Developing a Python Application Using NetBeans IDE or Introduction to Python EA in NetBeans IDE."