A simple template for a WebVis gist that enables the execution of python code. In this example, a random color is chosen with python’s random.choice() method, a new PNG image filled with the chosen color is created with the Python Imaging Library, and finally the image is displayed in a wrapper web page.
Strings that are printed by the python code are also sent to the JavaScript console (try to open the console to see that in action).