Update run.py

rewriting the whole script in Python... :)