Skip to content

Notebook ​

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 CasatiDecember 2, 2025· in Notebook· 1 min read

The notebook in full screen ​

A new button in the toolbar of Basthon's notebook puts it in full screen (and back). Ideal to project in class or to work on a small screen!

Full screen button


Romain CasatiJanuary 31, 2025· in Notebook· 1 min read

PDFs in Markdown ​

A subject, a worksheet or an exercise in PDF format can now be shown directly in a Markdown cell of Basthon's notebook, with the <embed> tag:

html
<embed
  src="https://basthon.fr/pdf/Basthon_Documentation.pdf"
  width="100%"
  height="500"
/>

For security reasons, only PDF files are accepted.

Play with it!

PDF in a Markdown cell


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