python

Radio 1 takeover reprise

January 2nd, 2005  |  Published in python

Bank Holiday Monday comes around again in a few hours time, and I’m off to BBC Radio 1 to help out on another Ten Hour Takeover show.

UPDATE: related random links and pictures.

Read the rest of this entry »

python for perl programmers

December 10th, 2004  |  Published in python

Tomorrow I’m giving a talk at the rather wonderful London Perl Workshop. I’ve worked with quite a few languages in my time, including about 4 years or so of writing mostly perl. These days I write in python when I have a choice, so I’m going to give an introduction to python for perl programmers. Here are the slides. Nothing fancy, just the basics.

Read the rest of this entry »

Taking automated webpage screenshots with embedded Mozilla

June 13th, 2004  |  Published in python

The other day I discovered Hotlinks, a rather nice link aggregator. It collects links from sites (including those of a couple of my respected colleagues) and combines them into a good-looking summary page. I particularly like the automatic webpage thumbnails it makes, which are created using khtml2png. I couldn’t get khtml2png to compile on my machine. After finding that there are now python wrappers for GtkMozEmbed, I made my own screenshotter-and-thumbnailer by embedding the Mozilla browser component using a little python script.

UPDATE: Ross Burton picked up the script and made a couple of enhancements. Miguel de Icaza posted a C# version.

Read the rest of this entry »

Audioscrobbler meets the commandline

May 3rd, 2004  |  Published in python

It’s been around for a while, but suddenly everyone’s talking about audioscrobbler again. I got interested when I saw a talk about last.fm at dorkbot a few months back. It’s based on the simple idea of instrumenting your music player to send a ping to a central site every time you’re listening to a track. Going further than just a ‘now playing’ on a sidebar on your website, this leads to a world of potential new music toys using collaborative filtering and the like.

At home I play all my music from the commandline: my mp3 jukebox has no fancy user interface, I just SSH into it. Audioscrobbler have several player plugins for download, but no commandline interface. I wrote myself some python code to play MP3s and talk to audioscrobbler so that I could keep my profile up to date.

Read the rest of this entry »

Moyles-proof code

April 11th, 2004  |  Published in perl, python

While the rest of the UK was enjoying a Good Friday lie-in, I dragged myself into Yalding House (home of BBC Radio 1) at 7.30am. I was there to see our new text message system get its first live broadcast use on the Chris Moyles show in a preview of the Ten Hour Takeover.

Read the rest of this entry »

Work at the BBC

March 8th, 2004  |  Published in python

There’s a job being advertised at BBC Radio and Music Interactive in London, where I work. It involves Python, XML, CMSes, digital radio and other interesting technologies. You’d like it there.

UPDATE: Applications have now closed.

FURTHER UPDATE: for unknown reasons, this page is (at the time of writing) number one hit on google for the search term work at the bbc (and perhaps some similar terms). For those who come here looking for work, I suggest you look at the BBC Jobs site or perhaps BBC Talent, where budding writers, presenters and DJs are sought.

Source distribution for Chumpologica now available

January 24th, 2004  |  Published in foaf, python, rdf, rss

Now available: the first source distribution of Chumpologica, the system behind Planet RDF and the Daily Chump Chumpologica.

Read the rest of this entry »

Dumping Geo RDF from Garmin GPS units

September 21st, 2003  |  Published in python, rdf

Having connected my GPS unit to my laptop, it was time to dump the data off into a usable RDF model.

Read the rest of this entry »

XML TV Listings in RDF

September 7th, 2003  |  Published in bots, python, xml

In preparation for a TiVoBot that I’m planning to write as a wrapper for scheduling digital WinTV recordings, I’ve been looking at TV listings data produced by tools from the XMLTV project. I started out using the XML directly and storing it using Berkeley DB XML but soon found (like most of my projects) that I’d be happier if the data was expressed as an RDF model.

Read the rest of this entry »

Ericsson Bluetooth phone as remote control

August 3rd, 2003  |  Published in hardware, python

After seeing Richard Clamp’s excellent talk at a london.pm techmeet on using Ericsson phones as remote controls I went away to code something similar (but less fully-functioned) in python for my own use. My code plugs into the Twisted framework and listens for phone keypress events. It uses the AT commands defined in an Ericsson PDF for the R320 phone, and it works with my T610.

Read the rest of this entry »