add bandwidth to a file download in python
Another short code snippet I came up when writing the module download script
The following class keeps a download under a certain ratio and prints live download stats (KB/s).
Read the rest of this entry »
Another short code snippet I came up when writing the module download script
The following class keeps a download under a certain ratio and prints live download stats (KB/s).
Read the rest of this entry »
I wanted to run a shell command in python without knowing if the shell command is going to exit within reasonable time (adplay that was, sometimes it simply hangs).
Update: the “task” module of Rob Hooft seems to solve this exact problem. At the time I wrote this, the python.net website was down. I leave my solution here just for archive purpose.

If you were part of the demoscene in your former life, if you were and still are fond of modules (those sound files with the mod, xm, s3m, it, … ending), if you are a linux user and if you still want to listen to this music on your computer without doing all the tweaks of installing (or even compiling) music player plugins for itunes or amarok or if you simply want to listen to Purple Motions tunes on your mp3 player then this little tutorial is for you. If not, then you won’t have read that far anyway..
While coding I often want to set a timer to be reminded when
On linux, the easiest way is to have this in your ~/.bashrc-File:
For having the popup message "pizza is ready" in 20 minutes, type sched 20 "pizza is ready".
For the bash-beginners (as me): $((math expr)) evaluates the math expression, i.e. 60*5 becomes 300. The parentheses around sleep and xmessage start a new sub process. So this still works if you quit the shell you started sched in.
If you start a django-app just now (January 2007) you are in a dilemma since using the old form engine is discouraged:
If you're starting from scratch, we strongly encourage you not to waste your time learning this
But then, the documentation of new form engine, called "newforms", isn't complete at all.
You may argue «take a framework above 1.0», and you'd probably be right. As I wanted to stick with django, I implemented form handling the hard way by figuring out how to use newforms.
Anyway, as I finally got formhandling working with newforms, I thought I'd share this with you, my fellow readers..
The following code..

This blog solely exists because with my other blog, I completely ran into a certain topic and there's no return.
This blog doesn't focus on only one topic. So: it's contents are not for you, subscribers, they are for you, Google-searchers, and you, link-followers.
Ah, and the background-color is taken from my favourite terminal. Thanks to sapientone for posting this design to wordpress' design pool. It's nice to start a blog without spending hours creating a nice looking design.