Using kwargs to initialize an object

by By: Kerim in python | snipplet

Way to many (possible and/or optional) parameters for a class? Here is a 5 second tip for all those old style Java-type-programmers...

Use kwargs, simple setter methods and run through the keys.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
class ...

Playing a mp3 stream with python

by By: Jens in python | snipplet

I listen to web radios aka music streams alot and usually do not really care how the players work. But recently i got somehow curious about how to play a mp3 stream with python. And it should run on my ...

Finding empty directories

by By: Kerim in python | snipplet

I know it sounds trivial but as usual the trivial things are those that are most annoying. Running through the harddrive of my notebook i came accross way to much garbage manifesting itself through empty directories.

After some 30 minutes ...

Rabid Ratings for Django

by By: Jens in ajax | django | python | snipplet | tools

For my new pet project i'd like to have some nice fancy starlike rating stuff, but without stars :-) Luckily i found one over at ajaxrain called Rabid Ratings. It uses nice looking hearts and is a out of the ...

Generating Names automatically

by By: Kerim in game development | python | snipplet

Ever tried to create names for Roleplaying Games (and other things) ?
In the process of implementing an MMORPG i asked myself how that could be done. Might be usefull for NPCs for example.
I found a nice article here about ...

Feeds and python II

by By: Jens in python | snipplet

i've got some time to continue my python and feed example

MyFeedsConfig.feeds contains a list of feed urls and we just try to receive, aggreate and sort them. pretty self explaining. The article class is also one of ...