cairosketchpad is a live coding sketchpad for Python/Cairo. See the screencast for an explanation.
$ cairosketchpad --create sketch.py
Now sketch.py contains:
def draw(cr, width, height): cr.rectangle(width/2.0 - 50, height/2.0 - 50, 100, 100) cr.stroke()
Now observe the sketch script by starting cairosketchpad.
$ cairosketchpad sketch.py
Now open your favourite editor and edit sketch.py the code is automatically updated in your view. Have fun! :)
Be sure you have GTK+3, PyGObject and Python 2.7 or greater installed.
$ git clone git://github.com/jpzk/cairosketchpad.git $ cd cairosketchpad $ sudo python setup.py install
PyGObject is a Python module that enables developers to access GObject-based libraries such as GTK+ within Python. It exclusively supports GTK+ version 3 or later.