Skip navigation

Python FTGL Bindings

I’ve just released PyFTGL which makes it possible to take advantage of FreeType and FTGL to render text in OpenGL program using TrueType, Type 1 or OpenType fonts. PyFTGL wraps the functionality of FTGL into a Python module so it can be used in conjunction with PyOpenGL.

Note that the bindings are still in alpha: they will work if you use them correctly, it’s just the error checking that’s currently missing.

Last.fm Radio Protocol

During the weekend I decided to hack together my own last.fm radio player in Python. I had found the My Playlist station pretty useless after being treated to the same three songs over and over again, and set out to code a player that would autoskip any songs I’ve already listened to once during a “session”.

So I combed the web and the official developer forum for useful information and even ended up digging into the official desktop client source code to find the answers to my questions. All information needed to implement a client (bar already officially documented components) have now been compiled into one spec-like entry in my last.fm journal.

import time as summer

Python Not many new posts have showed up here in a while due to the fact that a) I have nothing web or code worthy to say and b) I have been busy getting my native Swedish blog going.

But don’t despair. During my summer break this year I’ve started to code a new application in Python that I’m hellbent on completing and releasing. In the process I’m thinking about writing up some brief pythonic posts on topics I usually revisit (or relearn) every time I get back to code in Python. On the joy of Python.

Playing With Gettext in the Sandbox

I’ve done a translation of the Sandbox theme for my swedish section of the site using the GNU gettext tools. It’s pretty simple.

Read the full story

Blog Overcast: Tagclouds

One thing I’ve been fiddling around with lately in the WordPress default theme Kubrick is navigation. I have enhanced the Archives navigation in the sidebar and split up what used to be Categories into “Sections” and “Topics”, and finaly restyled “Topics” into a tagcloud.

Read the full story

Spin ye’ head

I wrote a simple header image rotator today to be able to substitute the boring blue “thing” with a 4th of July photo. The script is a variation on the header-img.php script included with the Kubrick 1.5 shipped with WordPress as default theme.

Read the full story

That Python Is Strangling Me!

I’ve given up on implementing Python classes using C API since I couldn’t get instancing in the C API to work properly. No helpfull error messages, either segfault or “wrong arguments in Objects\classobjects.cpp line 504″, no helpfull documentation, and me to tired to even type gdb. I’m going back to write a simple module and wrap it in classes written in Python.

But that solutions annoy me because it will mean I first write a module, transfering my C++ interfaces to something similar to a C interface (object-oriented non the less in a GTK+ way), and then wrap that module into Python classes miming the original interfaces. I had hope to shorten that path. But apparently failed to do so. Oh well, oh well… There’s another day tomorrow, said Scarlett O’Hara before she logged of.

Creeper