5.3. Jython console

To provide advanced features for power users, YaTiSeWoBe exploits the power of the Python [45] scripting language through Jython [35], an Open Source Java implementation of the interpreter. This document is certainly not going to be a complete introduction to the Python language. For this purpose, we propose a couple of references:

The console is a window plug-in (see Window type plug-ins) that lets you type commands interpreted by Jython. The result of the execution appears on the console also.

Jython console screen-shot

A screen-shot of the YaTiSeWoBe Jython console.

5.3.1. Console shortcuts

When typing commands in the console, the current position (or cursor) can be moved around, and used edit the command. The shortcuts defined for this console are inspired by those to be found for bash [20], the Bourne Again Shell, which is usually the default shell on GNU/Linux and Apple Mac-OS X (>10.3). Have a look to Learning the bash Shell [9] for more information. Knowing, understanding, and using those shortcuts can incredibly speed up the usage of the console features.

5.3.1.1. Cursor motion shortcuts

Shortcuts related to moving the cursor around while editing a command. Those shortcuts do not alter the edited command.

left, Ctrl-b

Move cursor back: one character to the left.

right, Ctrl-f

Move cursor forward: one character to the right

Ctrl-a

Move cursor to the front of the current command.

Ctrl-e

Move cursor to the end of the current command.

5.3.1.2. History shortcuts

Shortcuts that give access to the history of typed commands. Each command entered during a session is stored in a history that can be browsed. This is a really efficient way to reduce typing when redoing the same things repetitively.

up, Ctrl-p

Get previous command in history.

down, Ctrl-n

Get next command in history.

Ctrl-r

Search backward in history for a command containing a word.

5.3.1.3. Copy-paste shortcuts

Shortcuts that allow to cut and paste portions of a command. Combined with history shortcuts, those shortcuts speed up the edition of previously executed commands into slightly different ones.

Ctrl-d

Delete edited command.

Ctrl-k

Cut edited command ("kill") from current position to the end of the line.

Ctrl-u

Cut the edited command from current cursor position to the first character.

Ctrl-w

Cut the previous word in the edited command.

Ctrl-y

Paste ("yank") the contents of the buffer at the current position.

Ctrl-t

Swap characters between which the cursor is, or the last two characters cursor is at the end of the line.

5.3.1.4. Miscellaneous shortcuts

Shortcuts that don't fall in any of the above categories.

Ctrl-c

Cancel edited command.

Ctrl-l

Clear the console, placing edited command on top of the console.

5.3.2. Console environment

...

5.3.3. Executing scripts

...

5.3.4. Recording scripts

[Important]Future feature

As of version 0.1.2, functionalities described in this section have not been fully implemented yet, but are already planned for future releases of YaTiSeWoBe. See Section 6.8.2, “Forseable releases” for more details.

...