Skip to main content

A Thonny plugin that generates inline pseudocode explaining the Python source code line-by-line.

Project description

thonny-pseudocode

A Thonny plugin that generates inline pseudocode on-demand, explaining the Python source code line-by-line, powered by the PyToPseu project.

Table of contents:
Installation
User Guide
Limitations

Installation

Inside Thonny, click on Tools > Manage plug-ins... to open the plug-ins dialog. Search for the "thonny-pseudocode" package and install it. Make sure your installed version is at least 0.1.3.

Once installed, restart Thonny to load the plug-in.

User Guide

You can generate pseudocode with the plug-in's "Explain with pseudocode" command. There are 3 ways to trigger the command:

  1. From the menu:

Generating the pseudocode from the menu

  1. From the toolbar:

Generating the pseudocode from the toolbar

  1. Using the Ctrl+E/Cmd+E hotkey:

Generating the pseudocode using the hotkey

Once generated, the command may be used again to erase the generated pseudocode:

Note: When the plugin erases generated pseudocode, it will systematically remove all trailing whitespaces on all lines.

Erasing the pseudocode

Since the generated pseudocode is actually appended to the source code in the form of comments (preserving the developer's own comments), the developer may continue to edit the code afterwards. Using the command again on edited code will immediately regenerate pseudocode for the new code. As soon as the command is used a second time on a particular piece of code, the plug-in will erase the generated pseudocode.

Erasing the pseudocode

Limitations

The plugin currently has the following limitations:

  • It cannot generate pseudocode for code with the slightest syntax error
  • Generated pseudocode goes into the editing history and "pollutes" it, which means that erasing pseudocode then undoing the last change will bring back the pseudocode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thonny_pseudocode-0.1.4.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thonny_pseudocode-0.1.4-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file thonny_pseudocode-0.1.4.tar.gz.

File metadata

  • Download URL: thonny_pseudocode-0.1.4.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for thonny_pseudocode-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4290ffa2edfb6c133d02cfb82b0485f1d3aa49f21dd8781a0c6ed794c5a29776
MD5 ac69fdf63ef63179e4f117a921823b60
BLAKE2b-256 8d0d7128e4619ad10aab55b27363fb1a6fa124a8286df22758d5f10c080d0d5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_pseudocode-0.1.4.tar.gz:

Publisher: publish.yml on raja-s/thonny-pseudocode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thonny_pseudocode-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for thonny_pseudocode-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 12019dfa37c14e79c553a60f5681008ed718a38c116995e05f2389e751f6208f
MD5 abca1db44aed2385defe5549ecf9e873
BLAKE2b-256 95b71c93bb4bb9c1b471f86b5f25fe8b575b59bb43f5054b6e655a0a0c4e4f5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_pseudocode-0.1.4-py3-none-any.whl:

Publisher: publish.yml on raja-s/thonny-pseudocode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page