Skip to content

{ Category Archives } Python

The programming language

Flying High: OpenGL from Python, Part 2

This is second in a series of articles about algorithmically generating geometry to drive OpenGL from Python. << Back to part 1 Last time we got as far as creating some instances of our super-simple Shape class, and having Glyph and Render classes convert those to arrays for OpenGL and render them. This time, we [...]

Flying High: Hobbyist OpenGL from Python

This is a transcript-from-memory (what I wish I’d said) of the talk I just gave at EuroPython 2010, for which I owe a debt of gratitude to Richard Jones for his last-minute moral support while wrestling with projectors and refresh rates; and to the whole team of hard-working volunteers, especially John Pinner & Richard Taylor, [...]

Loving EuroPython Tutorials

I’ve been loving the two days of tutorials preceding the EuroPython conference. This morning I attended Richard Jones‘ splendid Introduction to Game Programming. It was an absolute pleasure to be walked through the creation of an example game like this, using Python game libraries like pyglet and Cocos, by someone who really knows what he’s [...]

Undocumented feature of the week: $PIP_DOWNLOAD_CACHE

Use Python? You should be using Pip. A replacement for easy_install, that supports uninstalling and plays nice with virtualenv. An apt-get for Python packages, if you will. It has a marvellous undocumented feature. Set the environment variable PIP_DOWNLOAD_CACHE to prevent re-downloading the same packages repeatedly when setting up environments on the same machine: > set [...]

More OpenGL from Python

My talk, Flying High : Hobbyist OpenGL from Python, was accepted for EuroPython 2010, \o/. I don’t want to reveal the best bits of my talks, but to whet people’s appetite, this is some of what my initial preparation involved. One thing I’m keen on talking about is algorithmic generation of interesting geometry. This is [...]

colorama: Simple cross-platform Python API for colored terminal text

Announcing new Python package, colorama: http://pypi.python.org/pypi/colorama ANSI escape character sequences have long been used to produce colored terminal text on Unix and Macs. Colorama makes this work on Windows, too. It also provides some shortcuts to help generate these ANSI sequences, and works fine in conjunction with any other ANSI sequence generation library, such as [...]

OpenGL Draw API Visualised

To help me grok and remember the OpenGL 3.3 draw API, I drew them in a diagram. I hope this will help me see at a glance what I can and can’t achieve with each function call. I haven’t annotated any of the parameter types. These days I tend to be calling these functions from [...]