Programming and writing about it.

echo $RANDOM

Category: Netbeans

NetBeans Community Docs: 300!

Hey all!

We at the NetBeans Community Docs have reached 300 documents! Wow! Exactly, 2 years back the program was started by James Branam!

Congratulations to all involved in the program! Thank You James for starting the program which have helped many a soul to do their bit for a great Open Source project.

A very big Thank You :-)


DTrace + NetBeans IDE + Python

The DTrace plugin for NetBeans brings the DTrace Toolkit and DTrace Chime to NetBeans on OpenSolaris. The DTrace toolkit ships with some utility scripts to talk with the Python DTrace providers.

Once you have installed the DTrace plugin, open Window > DTrace and in the Toolkit tab, choose Python:

You can see the various D scripts there. Let us take the script, ‘py_calltime.d‘, which will collect and display the time in us taken by each function call for a particular running Python process, whose PID you can supply during the run of the script, or start a Python process.

Here is a sample output:

With the ever developing Python support for NetBeans, you can start having some fun with Python, NetBeans and DTrace.

Disco + NetBeans IDE

Disco is a Open-Source implementation of the Map-Reduce framework, written in Erlang. Where as the framework is written in Erlang, Python is used to write the jobs (See glossary) for the framework. That is the link between NetBeans and Disco- Python. Agreed, there is another link, (, but I will take the first.

After you have got your setup ready,  (which is pretty damn simple), fire up NetBeans IDE with the Python bits installed:

  • Create a New Python Project, say PyDisco. Name the main file as ‘‘ 
  • Right-Click on the project > Properties > Sources, and add the pydisco, directory which you can find in the Disco tarball (‘pydisco’ is the Python package in which the Python API for Disco is defined)

In the output window, you should see this message:

Starting Disco job..
Go to http://localhost:7000 to see status of the job.

When you open the browser, you will see something like this:

Of course, this was just a way to show you how you can use NetBeans IDE for your development using Disco.

Hatching Python Eggs from NetBeans

Support for building Python eggs  (IZ #150283) from NetBeans IDE is now available in the repository. (Refer this link to see how you can clone the repository and build the Python bits). Please try it and file bugs and suggestions here

Now, I would like to talk a bit of Python Eggs and how to use the NetBeans IDE to build Eggs for your Python packages.

A Python Egg is to Python as JAR is to Java or a ‘gem’ is to Ruby. It comprises of your code, resources and all important metadata- version, dependency information, etc. All the gory details are here at

Use case in NetBeans

  • Right-click on the Python project name and select ‘Build Egg’
  • If you already have a file (Please refer the ‘assumptions‘ section below) , and a do a ‘Build Egg’ it uses that. (Do a ‘Clean & Build Egg’ to create a default file. If you don’t have a, one is created for you
  • The process can be tracked in the ‘Output’ Tab
  • Once the build process is over, you will see the the ‘egg’ has been deposited in the ‘dist’ directory (accessible in the ‘Files’ View)

It is not viewable from the ‘Projects’ view as it unnecessarily clutters the view.

Egg Formats

As you can see from the above view, there is also a file, EggDemo.egg-info, which is another format for Python Eggs as mentioned in

The wiki page has some more information.


These have to assumed, because that is the way it has to be:

  1. You have setuptools installed
  2. Your file lives in the top level directory- src or your existing sources’ root directory
  3. Your packages or sub-packages (those containing __init.py__) are actually in the sub-(sub)-directories under your top-level directory, in which lives

Congratulations NetBeans

…for the 2009 awards

Sample Python Projects in NetBeans IDE

I have pushed some basic sample projects in Python/Jython to help you in Python development with NetBeans.

For details, please see the page at

Vote for NetBeans

We need your vote for NetBeans as the BEST IDE in the SOA Readers’ Choice Awards

Python modules in the NetBeans 6.5 UC

You can now install the Python support for NetBeans from the NetBeans 6.5 Update Center provided you have the Beta UC added (which should exist by default)

Doing more with the New Project Samples tutorial

You can create and distribute project samples of existing project types , by following this tutorial at

Actually, with no work at all, you can use the above procedure to do (at least) 2 things more:

  1. If you have the need to create a new project category, that uses a project structure similar to any of the existing project types then, just choose the category appropriately. For eg. instead of Samples, just put it under a project category such as Java and your new project type will be displayed there (Assuming your code will use the Java project structure with Ant)
  2. Say, the project category doesn’t exist under Samples, then all you need to do is add an extra folder tag to your layer.xml. For eg. if the IDE does not yet have any Python samples category (it actually doesn’t, see Issue #15365), you just need to add the appropriate line in your layer.xml

NetBeans IDE for Python: my blog posts

Hi Folks,

These are the posts I have done so far on the NetBeans IDE for Python support:

Now, you can track all my posts on the Python support at: