Skip to content

Run Nammu from a console

Raquel Alegre edited this page Nov 14, 2017 · 1 revision

When doing development it's a pain to have to build the jar in order to test the latest changes because it takes too long.

In order to test it quicker, it's best to just cd into the repo folder, and then type this on a jython console:

from python.nammu.controller.NammuController import NammuController
nammu = NammuController()

You can now interact with Nammu via the nammu object.

For instance, the JTextPane is held in nammu.atfAreaController.view.editArea

For instance, you can now do:

nammu.atfAreaController.view.editArea.text = 'Here you can insert your text to replace the existing text'

Depending on your environment, you may also need to set the JYTHONPATH environment variable to point to the compiled java class files:

export JYTHONPATH=$HOME/<nammu root directory>/resources/lib

This command can be added to your .bashrc file to save having to set it every time you want to run nammu.

Clone this wiki locally