Skip to main content

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

Project description

thonny-pseudocode

Publish to PyPI

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

The plug-in currently supports generating pseudocode in English and French (depending on the UI language set by the user in Thonny's settings).

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 plug-in 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 plug-in currently has the following limitations:

  • It cannot generate pseudocode for code with the slightest syntax error
  • It may insert new-lines in the source code to have enough space for the pseudocode, but will not remove those new-lines when it erases the generated pseudocode
  • Generated pseudocode goes into (and "pollutes") the editing history, 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.6.tar.gz (23.8 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.6-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thonny_pseudocode-0.1.6.tar.gz
  • Upload date:
  • Size: 23.8 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.6.tar.gz
Algorithm Hash digest
SHA256 2cc90049cab537a2659e3dd6afda8d51437ffb10622e9e6127351220301bbd7c
MD5 d30ba2f2f0d0f04f609827112470ead3
BLAKE2b-256 68d55b61468ef046c3d4d82415110b590a4f9c2b468c845c324abfe21adf374c

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_pseudocode-0.1.6.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.6-py3-none-any.whl.

File metadata

File hashes

Hashes for thonny_pseudocode-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f207749bccb58159ef9dd19160a2aa0b3d7e8ad4f4e3134a03b41ead43eaf18e
MD5 cc88873024d641fed93314f81a64430d
BLAKE2b-256 f25820aa36b4bfbd5dc94cc6bf68915d9141f70b2077102a061b39f782e9e303

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_pseudocode-0.1.6-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