-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This project provides a Python package that creates an environment for graphics applications that closely resembles that of the Processing system. Usage is mostly restricted to importing the package and calling run()
.
For instance, this simple example taken from a Processing tutorial can be ported to pyprocessing as follows:
|
|
The project mission is to implement Processing's friendly graphics functions and interaction model in Python. Not all of Processing is to be ported, though, since Python itself already provides alternatives for many features of Processing, such as XML parsing.
The pyprocessing backend is built upon OpenGL and Pyglet, which provide the actual graphics rendering. Since these are multiplatform, so is pyprocessing.
We hope that, much in the same spirit of the Processing project, pyprocessing will appeal to people who want to easily program and interact with computer generated imagery. It is also meant to help teaching computer programming by making it possible to write compact code with rich visual semantics.
In essence, all you need is the pyglet package (see www.pyglet.org) and its requirements, i.e., OpenGL and Python (2.5 or 2.6). If you are able to run pyglet's sample programs, you are in good shape to run pyprocessing.
Download the source distribution and put
the pyprocessing directory (the one which contains __init__.py
, attribs.py
,
etc) in any place Python expects to find modules and packages. The simplest
way of achieving this is to run the provided setup.py program:
python setup.py install
This will copy the files to the proper places. You might have to have administration privileges to do this, however. In most flavors of Linux, for instance, you might have to type:
sudo python setup.py install
There are several example programs in the examples folder that you may try. You can find in the wiki some quick instructions on how to write a pyprocessing application, a tutorial and a short list of commands and functions.