Adding a Python Source

Add a Python source to your page to create custom, script-based calculations using CalcTree’s built-in code editor.

Getting Started

To add a Python source:

  1. Open the right-hand Integrations panel

  2. Click Code (If you already have one or more sources integrated to the page, just click "+ Add")

  1. 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)

Description
keyboard shortcut

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

CalcTree uses a Microsoft technology called Monaco Editor to provide the integrated Python editor. You can find more technical documentation about Monaco Editor here

Last updated