Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

PyOpenGL 3.0.2b2 is Out

If you have PyOpenGL dependent code, now would be the time to check that it runs against the latest beta.  Assuming no show-stopping bugs are reported this will be the last beta before 3.0.2 final is released.  Available in PyPI now.

Patch Django Management to allow pyc, so and pyd modules

So you have an "embeddded" Django instance where you want to strip the thing down to the minimum required files.  You run compileall on your site-packages, then strip/delete all of the .py files... and your Django becomes pretty useless, because it no longer recognizes any of your management plugins (not even the built-in ones).

This ...

Continue reading

A Day of Fun (QIII BSP File Loader)

While waiting for a server to get back online today I've been playing with a QIII map (BSP file) loader. Not much to it at the moment, it "parses" the whole file, but the rendering isn't particularly useful.

The loader uses numpy mmap'd files and typed views onto those to do the interpretation of the ...

Continue reading

Really Dumb HTML5 Video Tag Back-end

So you want to create a stupid-and-dirty HTML5 video tag to allow you to monitor a (local-only) multicast stream from your (Django + Nginx) web site?  Not something to be seen by "real people", but a way for you to see if anything is broadcasting?

This is a pretty simplistic thing, again; do *not* do ...

Continue reading

How can an audio server take up 900MB of RAM?

So we want to capture the (alsa) output of processes and pipe it into an mpeg-ts stream.  Except gstreamer's alsasrc can't do "monitor", so we wind up having to do a pulsesrc... which brings the server to its knees in a few minutes with memory exhaustion for no reason I can fathom.

Annoying part is ...

Continue reading

Experience has some value... and risk

Each time I sit down to help someone relatively new to coding I find myself somewhat awe-struck at how much I've "forgotten".  Just install nginx with gunicorn and django in a virtualenv.  Package up your code with a setup.py using distribute.  Run your unittests with Nose.  Use sphinx and embedded doctests.

You tell someone that ...

Continue reading

Piping Data Around with Fussy

In one of those cases where you ask a question, don't get an answer, then spend far longer than you intended playing with the problem, I've just added a Pipe mechanism to Fussy (why to fussy, you ask? Well because that's where I wanted to use it).  Basically it provides a small wrapper around subprocess ...

Continue reading

So apparently I don't need to write my own test code...

Just stumbled across the OpenGL Samples Pack, which is a bunch of OpenGL sample code for advanced features... exactly the kind of thing I need to test if I've got PyOpenGL working... of course, they're written in C, but it's way easier to translate from C to Python than to come up with dozens ...

Continue reading

2Day Python (Our Tutorial for Software Carpentry)

Went to the Ladies Learning Code Python session dry run this evening and it reminded me that we never got the Software Carpentry tutorial up.  It's now available for live reading at:

http://readthedocs.org/docs/2daypython/

and you can branch and alter/adapt the source (in restructured text) as you wish using:

bzr branch lp:2daypython

One thing that seemed ...

Continue reading

Announcing the Fussy Firmware Packager

As mentioned a while ago, I was looking for a firmware packager that would allow for "user uploads a signed bundle" style upgrades for hardware devices.  Esky is similar (even a similar on-disk layout), but focused on cross-platform and distutils-based "application" setup.  Fussy is intended for "core of a system" setups, where the entire user ...

Continue reading