eek! Please use code blocks. Especially for big monsters like that. I made the fix for you though, have a look at it with the edit button, you'll see that the cdoe blocks are the same as before with the bbPHP and SMF BBCode.

On a more on-topic note, Python is a strange language. I wanted to take it up to do some programming on an old Roomba I have, but doesn't work. I imagine if you understood it well, you could translate it to Object Pascal. Are there any websites dedicated to programming in Python out there?