added Python version of the script