Skip to content

Posts ​

Romain CasatiOctober 23, 2026· in Notebook· 1 min read

Sequenced notebook: breakpoints that can no longer be bypassed ​

In a sequenced notebook, what comes next only appears once the breakpoint cell (tagged breakpoint) has validated the step. Until now, a clever student could rewrite this cell to unlock the rest without answering.

Not any more: in Basthon's notebook, the code cells used as breakpoints are now read-only, and only a cell left identical to the teacher's can reveal the rest. The original code is also the one saved: saving or restarting the kernel cannot replace it.

Validation functions, the teacher's password and existing sequenced notebooks work without changing anything.

Play with it!


Romain CasatiOctober 22, 2026· in Python, Console, Notebook· 2 min read

Sound with p5 ​

Basthon's p5 module can now make sound, in isolated kernels as with the legacy kernel: p5.sound is loaded with p5.js. You can play sound files (loadSound), synthesize notes (Oscillator, MonoSynth, Envelope…) and analyse what you hear (FFT, Amplitude). The classes of p5.sound are used directly after from p5 import *.

Continue reading


Romain CasatiOctober 22, 2026· in Python, Console, Notebook· 1 min read

The webcam with p5 in isolated kernels ​

After drawing, interactions and images, Basthon's p5 module gains the webcam in isolated kernels: createCapture(VIDEO) works as with the legacy kernel. The video can be shown below the drawing, or drawn on the canvas with image.

python
from p5 import *

capture = None

def setup():
    global capture
    createCanvas(320, 240)
    capture = createCapture(VIDEO)
    # the video is drawn on the canvas, not shown below
    capture.hide()

def draw():
    background(255)
    # the size of the video is only known once the camera is open
    if capture.width > 0:
        image(capture, 0, 0, width, width * capture.height / capture.width)

run()

Play with it!

To protect students, Basthon asks for a confirmation at each call of createCapture, on top of the browser's usual permission: a program cannot turn the camera on behind its user's back. The camera turns off when the drawing is replaced by another one or when the kernel restarts.

Playing videos (createVideo) and sound (p5.sound) are still reserved to the legacy kernel for now.


Romain CasatiOctober 21, 2026

· 1 min read

The documentation goes online ​

Basthon's documentation is no longer a PDF: it is now part of the site, arranged in pages under the "Documentation" tab. The console, the notebook, Python, the other languages, advanced use and the list of the available modules each have their page.

No more document of several dozen pages to download: the documentation is read in the browser, fits phone screens and benefits from the site's search. Each section has its own address, handy to send a colleague or your students the link to the answer to their question.

The old links to the PDF lead automatically to the new pages.

Read the documentation


October 21, 2026· in Python· 2 min read

Graphviz 16, p5.js 1.11 and proj4js 2.22 ​

Three JavaScript libraries on which Python modules of Basthon rely had not moved for several years. They take a big leap, without changing anything to existing programs.

Continue reading