Skip to content

Python ​

Romain CasatiDecember 8, 2023· in New modules, Python· 1 min read

geojson ​

The geojson module arrives in Basthon's Python kernel to handle geographic data in the GeoJSON format. It goes very well with folium to show them on a map!

Play with it!

geojson


Romain CasatiDecember 4, 2023· in Python· 1 min read

A documentation for the basthon module ​

The basthon module, available in the Python kernel, now has its own documentation, generated automatically from the code: display and download functions, self-assessment module…

Read the documentation

Documentation of the basthon module


Romain CasatiDecember 2, 2023· in Python· 2 min read

The self-assessment module ​

Basthon's Python kernel ships a basthon.autoeval module to test students' code automatically. For instance, ValidateFunction compares a function with a reference function on a series of values:

python
from basthon.autoeval import ValidateFunction

ValidateFunction("absolute_value", [-3, -1, 0, 2, 5], valid_function=abs)()

The module also offers ValidateVariables to check variables, and is the basis of the sequenced notebook.

Play with it!

Self-assessment


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 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