If you have problems with the python script to figure out your Kindle firmware 4.0.1 root password, use the web page I just made at
http://members.ping.de/~sven/kindle.html
If you want to stick to the python script, what you do is
write the script to a file, e.g. kindle.py
Then open a terminal window, navigate to the directory with the script and type "python kindle.py" and it will run the script using the python interpreter.
python is installed by default on a Mac. On Windows you need to download and install it first.