Back to Krita

Scripter

plugins/python/scripter/Manual.html

6.0.1.11.6 KB
Original Source

Scripter

A small python scripting console.

Basic Usage

Write python code in the topmost code editor and press the play button on the top left to run it.

The box at the bottom represents the output, with error messages when it goes wrong.

Press Clear if you want to clear the bottom output.

Using the debugger.

Using the Debugger tab, you can go over each line separately to check what is going on in your program at that time. This is very useful to check which variables you’re using.

To start using it, press the Debug button above, next to the play button.

Then, switch to the Debugger tab. Both buttons are enabled now.

The red button is the Stop button, to stop debugging.

The second button is the Step button. Use this button to go to the next line. As you press this, the program gets further in its debugging.

Once you get near variables, the table at the bottom will show the interesting information, because for each variable it’ll show the following:

ScopeThe Scope can be either local or global. What this means is whether the variableNameThe name of the variable.ValueThe value of the variable, gotten via print(str(variable)).TypeThe type of variable it is. Maybe it’s a string, or a integer, or maybe it is a python object.

File Menu

NewCreate a new empty python script.OpenOpen a python scriptSavesave the script to file.Save Assave the current script as a new file.CloseClose the scripter

Settings

Syntax HighlighterThe Theme for Syntax Highlighting. Also includes background and foreground.FontsThe font used in the code editor.