This works really well, thanks for pointing it out. For those who are having problems, the problem is not Python but the 'export' program file. You can't just right-click and save-as to save the Python file from the Github site for some reason (doing so just saves the webpage, which is why you are getting the error, since it is an html rather than Python file). I got the code by left-clicking on the desired file, then clicking on the Raw tab (which gives the source code on one page), and only then right-clicking and selecting save-as. As I say, it worked well for me. Hope this helps.
[Sorry, just noticed that this has already been said in rather shorter form!]