...
The Python Tutorial for Geosoft GX Developer provides an overview of Python with lessons that demonstrate how to create extensions (see Hello World#DesktopExtension).
See also Python Stand-Alone that describes how to run Python scripts directly from the Python interpreter.