Skip to content

Language selection — English

For a short or ambiguous snippet, # language: xx explicitly selects the language.

Thonny recognizes .pseudo and .algo as the same Pseudocode language.

# language: en
Function maximum(a, b):
    If a > b Then:
        Return a
    Else:
        Return b
    End
End

Repeat 3 times:
    Display maximum(2, 5)
End

Shared language-resolution order: explicit directive, project configuration, automatic detection, then fallback language.

# language: en
pseudocode.config.yml
auto
fallback

Pseudocode → Choose language…

The language command acts on the active Pseudocode document. The source language is independent from Thonny's interface language.