I'm not used to python in windows, but you seem to have two issues:
The encoding/decoding is not working correctly. I don't get TM to show at all for example. I needed to change first line to say utf-8 instead of utf8 but it still not giving me the right characters, but it can run.
I ran it directly in prompt/double-clicking after adding:
input = raw_input
Guess it's because "input" is implemented recently. Don't know why you can use the backwards compatible "raw_input" instead.