Python Playground is a free open source live coding environment that lets you explore Python by creating 2D graphics, games and simulations, heavily inspired by Bret Victor's ideas.
UI is based on cross-platform Python framework Kivy that runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi.
The physics engine utilizes the Chipmunk2D — fast and portable 2D rigid body physics library written in C.
Please note that Python Playground is under heavy development and is incomplete in various areas.
- Fast code execution and tracing.
- Live coding feature helps you quickly and easily experiment and fix bugs.
- Smart smooth transitions from previous graphical output.
- Code autocompletion using Jedi.
- Nice colors using perceptually modeled CIECAM16 color model and alpha blending in linear space.
- LOGO Turtle mode (in progress).
- Sokoban mode (in progess).
- Game development and rigid body physics simulation.
Prerequisites:
- kivy,
- pymunk,
- scipy.
pip -r requirements.txt
python3 -m playground
- Think about new vector engine (AGG, Skia, Pathfinder or plain ugly Kivy/OpenGL).
- Add text labels.
- Graphic object selection and properties panel.
- Multithreaded & fast (PyPy) execution.
- Use simple and fast Oklab color model (add saturation scale) and drop patched colorio dependency.
- More featureful code editor like that of Codea.
- Collaboration & teamwork.
- Fix Sokoban and Turtle modules.
- Add geometric constraints like in Apparatus hybrid graphics editor.
- Symbolic mathematics and geometry using SymPy.
- Swift Playgrounds is a app for iPad and Mac that makes it fun to learn and experiment with Swift.
- Algodoo is a physics-based 2D sandbox.
- Codea for iPad lets you create games and simulations in Lua — or any visual idea you have.
- Kojo is a programming language and IDE for computer programming and learning that has many different features that enable playing, exploring, creating, and learning in the areas of computer programming, mental skills, (interactive) math, graphics, games and other. Kojo draws ideas from the programming languages Logo and Processing.
- The Programmer's Learning Machine (JavaPLM) is a free cross-platform programming exerciser. It lets you explore various concepts of programming through interactive challenges, that you can solve in either Java, Python or Scala (support for the C language is experimental).
- Apparatus is a hybrid graphics editor and programming environment for creating interactive diagrams.
See also:
- List of educational programming languages.
- Live coding, curated list.
- Powerful interactive graphics frameworks Paper.js and Flutter.
This code is under a GPLv3 License.
Shader-Based Antialiased Polylines (C) 2013 Nicolas P. Rougier.