Skip to main content

Python Gloop

Python Gloop is a browser-based Python IDE with 3D visualization for teaching programming. It targets secondary school students learning object-oriented programming through 3D graphics. The application runs entirely in the browser. No installation, no server, no accounts. Students open a URL, write Python, and see 3D objects appear on screen.

For example, a space scene could use GLKugel objects with different textures to represent planets. You could define subclasses like Gasplanet and Gesteinsplanet that override specific movement behaviors (polymorphism). These could then further be grouped into galaxies to manage multiple planets simultaneously. The possibilities are endless.

Python Gloop Editor

Give it a try at python-gloop.de (the soccer game example is a personal favorite!). I plan to release Python-Gloop as open source once it has been battle-tested in real-world classrooms.

Python Gloop Soccer Example

Key Features

  • Monaco-based code editor with full Python language support
  • Three.js 3D rendering displayed alongside the editor
  • Pyodide/WebAssembly execution -- Python runs client-side with no backend
  • Integrated terminal with interactive input() support via JSPI
  • Multi-file projects with a file browser, drag-and-drop upload, and folder management
  • ZIP import/export for saving and sharing projects

Python Editor

The editor provides a full Python Language Server powered by Jedi, running in a Web Worker inside the browser:

FeatureDescription
DiagnosticsReal-time error checking with German error messages
HighlightingBoth syntax and semantic token highlighting
Go to DefinitionJump to where a symbol is defined
Find ReferencesLocate all usages of a symbol
Signature HelpParameter info on function calls

All LSP operations run in WebAssembly through Pyodide. No network requests are made.

Syntax Hints

The editor includes more than 100 hover tooltips covering Python keywords, built-in functions, and common methods. Each tooltip provides a German explanation with a short code example. Tooltips appear on hover in the editor. They are configured via a JSON file and can be extended or modified.

GLOOP Library

The project ports the Java GLOOP library by Volker Quade (QUA-LIS NRW) to Python. The original library is widely used in North Rhine-Westphalia schools to teach OOP through 3D scenes. This port preserves the German-named API while replacing the Java/OpenGL backend with WebAssembly and Three.js.

The library provides:

  • Shapes: GLKugel, GLWuerfel, GLQuader, GLZylinder, GLKegel, GLKegelstumpf, GLTorus, GLPyramide, GLPrismoid
  • Environment: GLHimmel (sky sphere with texture), GLBoden (ground plane), GLTerrain, GLNebel
  • Camera: GLKamera, GLSchwenkkamera, GLEntwicklerkamera
  • Lighting: GLLicht
  • Input: GLTastatur (keyboard with any-key detection), GLMaus (mouse with consume-pattern click handling)
  • Utilities: GLTafel (text board), GLTextur (texture loading), GLVektor (3D vector), Sys (timing and system functions)

All classes inherit from GLObjekt, which provides transformation methods (verschiebe, drehe, skaliere, setzePosition, etc.).