Skip to content

Console ​

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

p5 in isolated kernels ​

The p5 module now works with Basthon's isolated kernels. The drawing is computed in the kernel, then shown in a frame isolated from the page, which passes it the interactions: mouse, keyboard and touch screen. Images (loadImage) and HTML elements (createButton, createSlider…) are supported too.

Play with it!

p5 sets Basthon on fire


Romain CasatiOctober 9, 2026· in Console· 1 min read

A new terminal for the console ​

The terminal of Basthon's console was entirely rebuilt on xterm.js, the terminal used among others by Visual Studio Code. On the menu: a more faithful display (emojis, colours, line wrapping when the window is resized), completion with Tab, commands over several lines, a history kept from one visit to the next, and hidden input for getpass.

Play with it!

The new terminal


Romain CasatiOctober 9, 2026· in Notebook, Console· 1 min read

Safer outputs ​

A notebook shared by a link can hold anything… Basthon therefore strengthens the security of everything shown in the notebook and the console:

  • HTML, SVG and Markdown are always sanitized with DOMPurify;
  • the JavaScript code of outputs runs in an isolated frame (sandbox), with no access to the page;
  • an output can no longer overflow its display area.

Interactive outputs keep working: they simply run in their sandbox.

Play with it!

Script run in a sandbox


Romain CasatiMay 1, 2026· in Python, Console, Notebook· 2 min read

Isolated kernels ​

Basthon's kernels (Python, OCaml, JavaScript, SQL and XCAS) are now isolated: the code runs in an environment separate from the web page that shows it. In practice:

  • more security: the code run has no access to the data of the page (such as your login information on a site that embeds Basthon);
  • a page that no longer freezes: a long computation no longer locks the interface;
  • real-time display: print and input show up as the run goes.

Play with it!

Real-time display

To get the former behaviour back, add the -legacy suffix to the kernel URL parameter, for instance https://console.basthon.fr/?kernel=python3-legacy. All the details are in the documentation.


Romain CasatiNovember 30, 2024· in XCAS, Notebook, Console· 1 min read

An XCAS kernel in Basthon ​

Big news: Basthon welcomes a new language with Bernard Parisse's computer algebra system Giac/XCAS. Like the other kernels, it runs entirely in the browser, with no installation nor server.

Exact computation, factorization, equation solving, integrals, matrices, curve plotting… with a neat mathematical display. It is available in the console and in the notebook.

Play with it!

XCAS