Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Go egg or go home (Setuptools seduces me...)


As of now I've introduced a dependency on setuptools into OpenGL-ctypes. The ability to readily define a published plug-in API is the thing that finally swayed me. It cleans up the array FormatHandler registration very nicely. It also makes a nice .egg, eventually should allow for automated installation, and generally is a lot simpler to ...

Continue reading

I suppose I will have to install Windows (Blech.)


With Python 2.5 out, probably need to build a binary of PyOpenGL-SWIG. That requires re-installing Windows (both machines are corrupt), then getting the whole MS-Toolkit compiler-chain re-built (double blech). Windows is a serious PITA.

The worst part is that I'm actually contributing to the monopoly-value of Windows (network effects) when I support libraries on it, ...

Continue reading

Hey buddy, looking for an Open Source Python job? (And other miscellany from PyGTA)


Had a good turnout at PyGTA last night. Aaron presented Panometric's (currently proprietary, may get open-sourced) web-application wiki. In essence this is a mechanism that allows users to edit an application's templates using a customised version of docutils that includes a number of directives for including e.g. auto-generated tables and the like. It works by ...

Continue reading

Ctypes arrays as storage format (Seems natural given the implementation...)


Today (and yesterday) I added support for making ctypes arrays first-class array-storage formats for OpenGL-ctypes. That is, you can do this:
import OpenGL
OpenGL.preferredArray( 'ctypesarrays' )

Before you import OpenGL functions in your application and array-producing calls will then use ctypes arrays for the produced arrays (i.e. glGet* will return ctypes arrays instead of Numpy ...

Continue reading

Adding a type for documentation in epydoc (ctypes "Functions" as routine data-types...)


As mentioned a few posts ago, I've been looking at how to make the OpenGL-ctypes auto-generated documentation useful. What I want to do is to register the ctypes "functions" as regular routines, with docstrings and preferably with structured meta-data such as the data-types of arguments, error-checker and the like displayed in a consistent way.

The ...

Continue reading

Running an email server at home is great (Until it gets turned off while you're out...)


It seems that either my workstation or my internet connection at home has gone down. Last time this happened it was a cable I'd mistakenly unplugged when grabbing a router. Time before that it was my cousin turning off the machine because it was keeping her awake. Both times, however, there was someone at home ...

Continue reading

Need a better documentation-generation system (Pydoc and pydoc2 just don't cut it...)


Spent the full work-day today on OpenGL-ctypes. The glGet* variables are now getting automatically registered. Image types, it turns out, seem to already be registered. I've also started work on making the docstrings more reasonable, little things like including the extension's Overview section in the docstring (so you can tell what the extension is intended ...

Continue reading

Tweaking the auto-generation (More work tomorrow...)


Spent the rest of the day on the auto-generation system for producing GL extension wrappers. Mostly I'm looking at parsing the extension definition files and turning them into instructions to do such things as registering glGet* extensions, automatically registering image types for support, that kind of thing. Also tweaked the code so that marking a ...

Continue reading

Eliminating the last required OpenGL-ctypes extension (Still two optional ones...)


This morning I decided to eliminate the _strings.so C module from OpenGL-ctypes. This module had a single function which retrieved the data-pointer from a Python string structure. That was done mostly because of things like potentially having a different Python version or a different Python compilation flag resize the PyObject structure header and wanting to ...

Continue reading