Adding a Python Node
Add a Python node to your page to create custom, script-based calculations using CalcTree’s built-in code editor.
Getting Started
To add a Python source:
Open the right-hand panel
Click in the Nodes tab
Click + and select Python

Start coding (A new code editor will appear at the bottom of your page with some initial helpful tips)

All code runs automatically once it is complete and has no errors.
Python Editor Features
CalcTree’s built-in Python editor includes:
Syntax highlighting
Autocomplete and inline hints
Real-time error reporting
Keyboard shortcuts
Find and replace
This editor is powered by Monaco Editor, the same technology used in Visual Studio Code.
Editor Shortcuts (Windows / Mac)
Undo
Ctrl + Z
Redo
Ctrl + Y
Cut
Ctrl + X
Copy
Ctrl + C
Paste
Ctrl + V
Toggle Line Comment
Ctrl + /
Search
Ctrl + F
Replace
Shift + Ctrl + F
Increase indent
Tab or Ctrl + ]
Decrease indent
Shift + Tab or Ctrl + [
Move a line up
Alt + Up
Move a line down
Alt + Down
Select all
Ctrl + A
Select to the end
Alt + Shift + Right
Select to the start
Alt + Shift + Left
Undo
Command + Z
Redo
Shift + Command + Z
Cut
Command + X
Copy
Command + C
Paste
Command + V
Toggle Line Comment
Command + /
Search
Command + F
Replace
Option + Command + F
Increase indent
Tab or Command + ]
Decrease indent
Shift + Tab or Command + [
Move a line up
Option + Up
Move a line down
Option + Down
Select all
Command + A
Select to the end
Command + Shift + Right
Select to the start
Command + Shift + Left
Last updated