Dumb PyDoc Replacement for PyOpenGL
Written by
on
in
Snaking.
I have been using "standard" Pydoc (actually slightly hacked) to document PyOpenGL outside the man pages, but PyOpenGL is almost entirely composed of things that don't work well with the standard tools; functions are actually class instances that check for availability before attempting to call, "functions" are defined in "raw" modules then imported into their final locations, lots of the code is replaced by accelerator modules, etceteras.
Some time ago I started writing a rather stupid little replacement tool that is PyOpenGL specific and can be (easily) taught how to handle new object-types. The biggest downside of it is that it no longer processes the docstrings to extract information (intra-module links, emphasis, http links, etc), but it does make the "pydoc" for PyOpenGL a little more useful, particularly modules such as arrays.VBO.
Comments
Comments are closed.
Pingbacks
Pingbacks are closed.
Roger on 06/13/2011 12:54 p.m. #
There are other approaches. I use Sphinx which generates far better documentation and can use rst as the input format.
My final doc consists of hand written rst, doc strings extracted from the module and rst generated from parsing comments in some C source files. Sphinx munges all that together with great looking results.
Mike Fletcher on 06/13/2011 1:09 p.m. #
Yeah, the problem is the "doc strings extracted from the mod" part, to get the standard tools to work I have to teach each of them how to handle the structures of PyOpenGL. Having done that for PyDoc, and then ePyDoc (both painfully complex), I didn't really feel like charging into teaching sphinx the same. Possibly sphinx would be less painful than the other two, but this was easy enough to get done that I didn't feel the need to explore that route.
Albert Wister on 07/03/2011 1:40 p.m. #
hi everyone. PyOpenGL a good place to start learning opengl programming? My friend said that Pygame + PyOpenGL = Good starting place for my project.