EuroPython 2008 + Django sprint

After visiting this year’s awesome Pycon in Chicago I’m very looking forward to attend another major event of the Python community: Europython 2008 in Vilnius, Lithuania. The flight and accommodation is surprisingly inexpensive, so if you are not sure about attending here are some other good reasons.

Guido at Pycon 2008

The call for participation went out in April and promises to bring us all a great conference. If you have a good idea for a talk or a lightning talk, want to be in touch with other developers of your favorite Python software in an open space or just like to hang out with nice people please consider participating. Since Europython is a community conference you decide what will happen!

Django sprint?

As you may know EuroPython is divided in a conference and a sprint part. Like other occasions in the past (like Pycon) I think there is a good chance we can hold a Django sprint if enough people join. And I think on the way to Django 1.0 it’s a good time to fix bugs, work on documentation, test edge cases, discuss new features, work on reusable apps and do other fantastic things with Django. We all have seen what the queryset-refactor brought us, so let’s meet to work on the rest of list.

If you are interested please leave a comment here or come to the #django-sprint IRC channel to discuss things further.

UPDATE

Yay, apparently Europython’s registration opened today!

15 May 2008 — Django, Python —Comments (3)

Django and Trac install scripts for Virtualmin Pro

Since version 3.56 Virtualmin Pro is slowly gaining support for Python based web applications because it includes an official install script for Django. This makes my version of a Django install script slightly unnecessary, even though the official version only supports stable releases (0.96.1) and not the SVN trunk (which we all know is quite common in Djangoland). Anyway, I think this is great news.

Other Python based web applications also benefit from the official Django install script of course because there are some helpful features in Virtualmin’s codebase now. Which brings us to:

Trac

Virtualmin already does a great job managing Subversion repositories for virtual servers but misses an install scripts for a web application that makes working with these repositories easier later in daily work. Since I really like Trac for its ease of use, powerful features and ubiquity in the developer scene I wrote an install script for it: trac.pl.

Just put it in /etc/webmin/virtual-server/scripts/ and go to the “Install script” section. Keep in mind that you need to create the repositories (important: with “Allow anonymous read access?” set to yes) and give the users the appropriate rights to access the SVN repositories before. The installation looks like the following image and results is this Trac installation: http://jannisleidel.com/trac/.

trac install page


I used a server running Debian Etch and Virtualmin Pro 3.56 to build that and would love to hear what experience you have with it.

2 May 2008 — Django, Python —Comments (0)

Python library for reactable’s TUIO protocol

Although I don’t normally write much about my studies at Bauhaus-University Weimar I’d like to show you today one particular interesting product of my university work: pyTUIO.

First some background: Some time ago I attended a workshop on tangible user interfaces at the great Interface Culture Lab Linz that was held by Martin Kaltenbrunner. We learned a lot of theoretical stuff about physical and tangible user interfaces and even had a look on using a very cool Software: reacTIVision.

fiducial example

reacTIVision is a video tracking software for so-called fiducials (see left image), markers that can be attached to any object. While being filmed by a camera, reacTIVision recognizes these markers and determines their position and other relevant data.

This information is then sent as OSC messages to a specific socket. The Music Technology Group for example created the reactable by using reacTIVision and a custom software. Hop over to Youtube if you want to know how it looks like.

Then last year, during the summer semester, I had the pleasure to work with Nicole Weber to develope the software for her Newsmachine, a realtime video mixer, based on reacTIVision, Python and Pygame. This was great fun but still had some bugs, programmatically and logically. Building a live video mixer with Pygame wasn’t the best idea since it seemed to have reached almost its limit of performance. Anyway, it actually led to something better:

pyTUIO

A Python library that understands the TUIO protocol.

I abstracted most of the logic from the Newsmachine code and tried to make it very easy to start tracking tangible objects. Consider this working code snippet:

import tuio
tracking = tuio.Tracking()

try:
    while 1:
        tracking.update()
        for obj in tracking.objects():
            print obj
except KeyboardInterrupt:
    tracking.stop()

This is all it takes to start receiving positional data of tangible objects.

Nodebox

I’m also very happy to see it included in Nodebox, which is “a Mac OS X application that lets you create 2D visuals (static, animated or interactive) using Python programming code and export them as a PDF or a QuickTime movie.”

I really like the idea of being creative with code, so it was a no-brainer to ask the developers of Nodebox to add the library. Don’t miss the documentation of the TUIO library at the Nodebox site.

While holding two fiducials in front of the camera, the following Python code created in Nodebox the image on the right, for example:

tuio objects demo nodebox

tuio = ximport("tuio")

def setup():
    global tracking
    tracking = tuio.Tracking()

def draw():
    global tracking
    tracking.update()
    fontsize(10)
    for obj in tracking.objects():
        x = obj.xpos * WIDTH
        y = obj.ypos * HEIGHT
        rotate(obj.angle)
        rect(x, y, 20, 20)
        reset()
        text(obj, x, y)

def stop():
    global tracking
    tracking.stop()

Google Code project

I also would like to encourage you to go to pyTUIO’s Google Code project site to learn more about it and see some other examples.

10 March 2008 — Python —Comments (4)