The nbPython project aims to provide support for Python development to NetBeans.
The bits are available (milestone releases) for download now as NetBeans modules (nbms).
Let us get started
- D/l the M3 NBMs from here
- Unzip it
- Fire up NetBeans IDE
- Go to Tools -> Plugins -> Downloaded Tab
- Click on "Add Plugins" and select all the NBM files in the unzipped directory
- Now, you will see all the chosen modules alongwith their descriptions. You should see something like:

- Press the "Install" button
- On NetBeans 6.1 I get a dependency error:

- Then, I downloaded a latest build NetBeans IDE Build 200806220002 from here and repeated the above steps. This time there was no dependency problem
- You will get a "Validation Warning". Press "Continue"

-
The installation will continue and will be over without any further user interaction required
New Python Project
- Go to File-> New Project-> Python-> Python Project. Choose a Project Name- say "HelloNbPython". Click on Finish

- A new project gets created and is visible in the Project Explorer window. No default file is created
- Right Click on the project name, and select New-> Empty Python File. Enter a name, say- HelloWorld

- A Python script will be generated for you which will simply print "Hello World"
The project tree is now:
HelloNbPython/pyproject/project.properties
src/HelloWorld.py
Run the Python script
- Right Click on HelloWorld.py in the project explorer and click "Run Python Script"
- First time I did this, I got the following exception message:
- java.io.IOException: Cannot run program "/home/amit/netbeans-dev-200806220002/nbpython/jython-2.5/bin/jython" (in directory "/home/amit/NetBeansProjects/HelloNbPython"): java.io.IOException: error=13, Permission denied
- So I checked the file permission of the 'jython' executable:
- $ ls -l jython
-rw-r--r-- 1 amit amit 5101 2008-06-22 15:05 jython - As you can see there is no executable permission for 'jython' as indicated by the absence of the 'x' flag
- So, I made the 'jython' executable by: chmod +x jython
- Run the script again and you should get "Hello World" in the output window



Sorry about the hiccups. I just published the note about development build. The article looks great. Thanks for your support
Allan Davis
Lead Developer nbPython
Posted by Allan Davis on June 23, 2008 at 04:16 AM IST #
Great.
Posted by Amit on June 24, 2008 at 04:27 PM IST #
I'll try and be back!
Thanks for your quick response!
Steve
Posted by Steve md on June 25, 2008 at 12:56 AM IST #
Hello Davis,
Code is running! I haven't tested
the debugger yet, but code is running
You can provide the way to change color
for python codes.
thanks alot for making good IDE for python
God bless you
Steve
Posted by Steve md on June 25, 2008 at 02:51 AM IST #
This is a much awaited addition to netbeans. I tried using this with the Netbeans php vdelopment Early access build.
Also didnt have jython installed. Jython is now in my path.
However when I run the Helloworld I get the following error ( maybe I should post to forum instead of here?)
java.lang.AssertionError: is a file
etc etc
Have filed a report with id 69678
Posted by Hari Jayaram on June 26, 2008 at 08:35 PM IST #
Hari,
Could you please let me know some more details or a link to the issue you filed?
Posted by Amit on June 27, 2008 at 05:03 PM IST #
Hello I have a problem to execute my python script in netbeans-windows. Maybe now you are thinking something like "and what are you doing developing in Windows environment". The truth is that in my current job, I have sometime, where i can develop all that I want, but the OS is windows in all the computers.
The exception that give me is:
"java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
Caused: java.io.IOException: Cannot run program "E:\netbeans\NetBeans\nbpython\jython-2.5\bin\jython" (in directory "C:\Documents and Settings\pablojgg\My Documents\NetBeansProjects\HelloNbPython"): CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at org.netbeans.modules.languages.execution.ExecutionService$2.run(ExecutionService.java:362)
[catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)"
Sound bad no???. I hope that somebody of you have the same problem before, and give me a solution!.
Thank you for your time, and congratulation for the post.
Pablo.
Posted by pablo on June 29, 2008 at 09:45 PM IST #