wxPython: How to combine StyledTextCtrl with pygments

Pygments is nice. It colorizes your code, has support for 1001 languages, and you can add your own highlighting scheme with just a few regular expressions. By default, it generates some HTML/CSS however, which is unusable within any editor component in your program. Here’s how to combine it with a StyledTextCtrl wxPython widget – the trick is to write a simle Formatter for pygments that wraps pygments’ default styles (or the ones you defined in your lexer) to some styles you have defined in your StyledTextCtrl. (code after the break)
(more…)

pwned

Even more miscellany

You get this message by using the hack back button of your browser, after logging in. Pretty cheeky for an official site of the German administration.

irc word games

words

a few quick updates on the software tree:

  • phenny word games is a list of wikipedia based word games for the phenny irc bot written in python. There are implementations of games not unlike boggle[tm], anno domini[tm], taboo[tm] and common trivia and anagram modules. If you would just like to have a look how they work, join us at irc://irc.foonetic.net/#puzzles
  • the whole software tree has moved from svn to git. voices in my head told me to.

Importing GPX tracks into TangoGPS

tangoroute

TangoGPS is a wonderful tool to navigate using OpenStreetMap data. Currently though, it does not yet support the loading of track files. However, here is a little hack to insert track points from a GPX file into the tangoGPS POI database. This may be useful for rudimentary routing and for geocaching. As seen on the screenshot, a route is displayed as a series of unconnected track points.

The small script is written in python. It requires pysqlite2. It reads a gpx file, and inserts track points directly into the file poi.db which you can find in your .tangogps directory. It works for me and files generated by the Open Route Service. Your mileage may vary, and you might have to edit the regular expression which identifies the track points (Refer to the comments for using it with gpsbabel) . Don’t forget your backup.

Download here: gpx2tango.py

More tools:

  • loc2tango.py for those geocaching.com loc files.
  • pocket2tango.py for those geocaching.com pocket query GPX files. Includes basic information (and, optionally, hints) into waypoint information. Writes full html cache description to separate html file.

a multiplayer 3d foosball simulator

NetKickern

I am currently writing an open source network multiplayer 3d foosball simulator: NetKickern. It will use the Panda3d graphics engine and the open dynamics engine for physics simulation. Development versions have been successfully tested on GNU/Linux and Windows.

Update: The game is already playable and fun in a two-player server/client variant. The Pyode physics simulation provides realistic friction and drag effects to simulate a professional (rough, but rather bouncy) soccer ball. You are able to tap-stop the ball (if only with a slight workaround) and make realistic push and pull shots after some training. What we can’t provide for is the force-feedback of a real table. As we have got a Leonhart Original table at work, the graphics and feeling will probably most resemble this table. Other planned and not-yet-implemented features include different game modes such as four-player games, tournament or pub style scoring. As of August 2008, we’re still at an early stage, and you’re very welcome to contribute with ideas, wishes, graphics, code, pyode gurudom and feedback.

Find the latest svn downloads in my trac farm at:

http://relet.net/trac/netkickern

freimap has moved here.

Freimap, the topology and traffic analyzer I am working on in not so regular intervals has moved here. It used to be located at freimap.berlios.de. But since that latter service is showing more and more irregularities and little maintenance, I decided to set up my own little trac farm. Given the experience I have with my own server projects, there may be more downtimes, but at least I can fix it if it breaks.

Here’s a screenshot from the latest svn version, to keep you entertained. It shows flow data visualization from the freifunk network at the 24c3 in the bcc berlin.

flows

java implementation of the schulze method

Since I couldn’t find a library that implements the Schulze Method for Condorcet Voting in Java, I wrote one. Click here for the source code. It’s not extensively tested, but should work. Comments are welcome.

upgrading to year 2.0.0-8 (multiverse)

Having just returned from the twenty-fourth chaos communication congress, I am now preparing to make a relaxed transition to the next release of time 2.0. We’ve collected quite a bunch of measurements in the freifunk network set up at the congress, and I will parse through these during the next days.

The congress itself was great, as usual, and I sincerely suggest that you parse through the schedule and recordings of the talks if you haven’t done so already.

screenshot-24c3

I am as always impressed by the sheer number of intelligent, creative people gathering in such a small place and the things that just emerge.

KMLbag aggregates Google Maps

KMLbag is a small PHP script which allows you to aggregate multiple KML files into one single file, via a web interface. For example, you and your friends may each create your own Google “My Map”. KMLbag will show the combination of all Placemarks in a single map.

Download KMLbag version 0.2 alpha. (+KMZ support)
(Older versions: KMLbag version 0.1 alpha.)

wild west easter time.

I will be heading west to Hamburg for the easterhegg during the weekend, where I was promised a place for my hammock. And I am hoping to abuse of the incredible synergies of a horde of caffeine-intoxicated code-monkeys to yak about Some Things Measurement[tm] in the freifunk network.

freimap.berlios.de

The above is a screenshot of freimap, a small visualization and analysis tool for olsr networks I wrote during the last weeks.