Skip to content

Run, lint, format and transpile — English

The CLI provides execution, linting, formatting, transpilation and flowchart generation.

  • F5 / Ctrl+R / ▶ — Run
  • Pseudocode → Analyze
  • Pseudocode → Format
  • Pseudocode → Convert → Pseudocode → Python
  • Pseudocode → Convert → Python → Pseudocode
  • Pseudocode → Choose language…

Thonny uses the same core/LSP diagnostics as the rest of the ecosystem. Formatting and conversion operate on the active .pseudo or .algo document; generated files open in a new Thonny tab.

Snippets / completion

Completion uses the same canonical snippets as the shared core. Thonny inserts safe plain text because Thonny 5 does not implement LSP snippet tab-stop placeholders.

if

If ${1:x > 0} Then:
    ${2}
End
$0

if_else

If ${1:x > 0} Then:
    ${2}
Else:
    ${3}
End
$0

for_range

For {1:i} from {2:1} to ${3:n} Do:
    ${4}
End
$0

for_range_step

For {1:i} from {2:1} to {3:n} step {4:1} Do:
    ${5}
End
$0

for_each

For {1:i} In {2:values} Do:
    ${3}
End
$0

while

While ${1:x > 0} Do:
    ${2}
End
$0

repeat_count

Repeat ${1:3} times:
    ${2}
End
$0

repeat_until

Repeat:
    ${1}
Until ${2:x > 0}
$0

function

Function {1:maximum}({2:a, b}):
    ${3}
End
$0

function_typed

Function {1:maximum}({2:a, b}) -> ${3:integer}:
    ${4}
End
$0

constructor

Constructor(${1:a, b}):
    ${2}
End
$0

class

Class ${1:maximum}:
    ${2}
End
$0

class_inherit

Class {1:maximum}({2:Person}):
    ${3}
End
$0

process

Process {1:maximum}({2:a, b}):
    ${3}
End
$0

subprocess

Subprocess {1:maximum}({2:a, b}):
    ${3}
End
$0

algorithm

Begin:
    ${1}
End
$0

select

Switch ${1:x}:
    Case ${2:1}:
        ${3}
    Default:
        ${4}
End
$0

input

Input {1:n}0

input_integer

InputInteger {1:value}0

input_float

InputFloat {1:value}0

input_string

InputString {1:value}0

input_boolean

InputBoolean {1:value}0

input_array

InputArray {1:value}0

input_dictionary

InputDictionary {1:value}0

input_set

InputSet {1:value}0

input_tuple

InputTuple {1:value}0

xor

{1:a} XOR {2:b}$0