QUOTE(kanak @ Feb 25 2008, 03:21)

Maybe using numpy arrays would help?
How about building an encoder? that might be more fun.
Thanks, I'll check out numpy.
The code works fine with Psyco and gets a good speed-up using it, still too slow to be very useful though (on a machine that can decode a WavPack file in a few seconds with the C version it takes a couple of minutes with the Python decoder).
I'm actually current writing a WavPack encoder in Java

But I probably won't convert it to Python, I really only wrote the decoder to teach myself how Python is put together.