Developing Python/Sage with Netbeans

Netbeans is a GUI development environment. The following instructions explain how to work on Sage, for Linux (Ubuntu 8.10, but should work everywhere (works on Mac OS 10.4)). It helps with coding, build and run still on command-line. Sometimes it just guesses things, but most of the time it is pretty smart and gives help for navigating around, completion of commands and more.

written by harald.schilly@gmail.com, 2009-01-18

2010-29-11: the following instructions do not teach netbeans how to deal with cython files, which implies you cannot run most sage scripts.

Benefits

Requirements

Setup

Definitions

Instructions

These instructions are intended to use the Python version that ships with Sage. It's probably ok to just setup a new project using the system wide Python x.y.z.

  1. $NETBEANS_ROOT/bin/netbeans
  2. File > New Project - Python > with existing sources

    • Name: "SageNetbeans" or what you like, save it in your $HOME dir

    • Python platform: Manage - "New..." - select Python executable "SAGE_ROOT/bin/python" (note: or "SAGE_ROOT/local/bin/python") , name it "Python x.y.z Sage"

    • select "Python x.y.z Sage" on the left, on the right in tab "Python Path" you can see the paths are in $SAGE_ROOT/local/lib/... (maybe click "auto detect" ?) (you can change this later in the project properties)
  3. next > source root folder: "$SAGE_ROOT/devel/sage/sage" - finish!

Note

Mercurial

Netbeans supports Merucrial out of the box. Right-click on files in "File" window (Window>Files), see local diffs in a special diff window, commit changes, undo local changes. The Netbeans editor itself also supports nonlinear undos, right click on the left side of a highlighted change, see the diff, change only this part as in the local repository.

Trac Integration

It is theoretically possible to integrate Netbeans with Trac using CubeĀ°n. Maybe someone wants to look deeper into this ...

Open Issues

Further Info


DocumentationProject

Netbeans (last edited 2010-11-29 08:43:35 by pang)