add old python ugly but work code.

I write them in 2007