Skip to content

Posts ​

Romain CasatiNovember 22, 2023· in Notebook· 1 min read

Line numbers from the start ​

With the linenumbers extension (URL parameter extensions=linenumbers), Basthon's notebook opens with line numbers shown in every code cell. Handy to tell a student "look at line 4"!

Play with it!

Line numbers


Romain CasatiNovember 7, 2023· in Notebook· 1 min read

The sequenced notebook ​

With the sequenced extension, Basthon's notebook reveals itself step by step: what comes next only appears once the student has passed the current step.

Enable the extension in the URL (extensions=sequenced) and tag breakpoint the cells used as breakpoints. These cells call validation functions, usually put in a separate module so as not to give away the answers.

Play with it!

Sequenced notebook


Romain CasatiOctober 6, 2023· in New modules, Python· 1 min read

openpyxl ​

The openpyxl module arrives in Basthon's Python kernel: Excel files (.xlsx) can now be read and written, directly or through pandas.read_excel.

openpyxl


Romain CasatiSeptember 29, 2023· in Notebook· 1 min read

Collapsible admonitions ​

The admonitions of the notebook can now be collapsed: just replace the !!! with ???. Ideal to hide a hint or a solution!

markdown
??? tip A hint?
In Python, the power is written `**`.
???

Play with it!

Collapsible admonitions


Romain CasatiSeptember 23, 2023· in New modules, Python· 1 min read

pyflakes and pycodestyle ​

Two new modules in Basthon's Python kernel to analyse code without running it:

  • pyflakes detects likely errors: unused import, undefined variable…;
  • pycodestyle checks that the style conventions of PEP 8 are respected.

pyflakes and pycodestyle