Category archives: Snaking
Discussions of programming, particularly of programming Python
GStreamer Level Plugin Monitoring
Written by
on
in
Snaking,
Tuxedo.
So you have an audio stream where you'd like to get a human-friendly readout of the current audio level. You add a level component, but how do you actually get the level messages it generates?
bus.add_signal_watch()
bus.connect( 'message', self.on_level )
It really seems that you *should* be able to use element.connect(), but there doesn't seem ...
wx in a VirtualEnv (for RunSnakeRun)
Written by
on
in
Snaking.
Since I got asked about this in email I'll post it here for the google-verse. Say you want to allow your developers to use RunSnakeRun running in a virtualenv on an Ubuntu distribution. You'll recall that normally to run RSR as a utility you do:
$ sudo apt-get install python-wxgtk2.8 $ pip install --user SquareMap ...
RunSnakeRun/Squaremap with wxPython 3.0.0
Written by
on
in
Snaking.
There is a very minor new release on PyPi to allow Squaremap (and thus RunSnakeRun) to run on wxPython 3.0.0. The only people likely to be affected are those on bleeding-edge distros (Gentoo, Arch) or Windows. You should be able to
pip install --update SquareMap
To get the latest version. Thanks to Kristof for the ...
PyOpenGL 3.1.0 final is out
Written by
on
in
Snaking.
After far too long, and way more changes than originally intended, PyOpenGL 3.1.0 final is now out. The big changes are:
React.js with Django
Written by
on
in
Snaking,
Pony.
So I've been doing a spike test with a project where I'm trying to use React.js to build a front-end to a Django application. The bulk of this application is basic Django forms, posts, page-loads, etc. but there's a number of complex views for scheduling, content uploading etc. As of now I think I'm willing ...
Found the source of SegFaults on AMD + FreeGLUT
Written by
on
in
Snaking,
Tuxedo.
So the source of the segfaults that I'm seeing on fglrx and FreeGLUT on Kubuntu 14.04 has come to light. It's a known issue with the registration of FreeGLUT and fglrx at-exit handers (at the C level). You can work around it in your own code with PyOpenGL 3.1.0b3+ (which is still pending release) using: ...
Auto-generating Output Declarations
Written by
on
in
Snaking.
So the good news is that I've now got far more PyOpenGL output parameters automatically wrapped such that they can be passed in or automatically generated. That drops a *lot* of the manually maintained code. OpenGLContext works with the revisions, but the revision currently does *not* support non-contiguous input arrays (basically the cleanup included removing ...
Enums and Output Variables
Written by
on
in
Snaking.
Walter on PyOpenGL Users pointed me at the chromium "regal" tool, which has a table of constant definitions for output parameter sizings. I have a similar mechanism inside PyOpenGL's source code, so I parsed the table out of regal and used it to spot and plug gaps in the PyOpenGL table. The regal stuff is ...
So close on py2exe with PyOpenGL
Written by
on
in
Snaking.
I played with getting a py2exe executable created from PyOpenGL today, and it is very close to working. The basics:
from distutils.core import setup
import py2exe
import glob, os
import OpenGL
data_files = [
(
os.path.join('OpenGL','DLLS'),
glob.glob( os.path.join( os.path.dirname( OpenGL.__file__ ), 'DLLS', '*.*' ))
),
]
if __name__ == "__main__":
setup(
windows=['shader_test.py'],
options={
"py2exe": { ...
PyOpenGL 3.1.0b2 Available for Testing
Written by
on
in
Snaking.
The second (and hopefully last) beta for PyOpenGL 3.1.0 is now available. These are the changes since Beta 1. If there's nothing critical showing up I'll do a final release in a few weeks.
- Generation fixes (lots of them)
- GLES/GL-only extensions should now be generated only in the appropriate directories
- Extensions which are multi-api will ...