change ipython workflow to a python file