factory.py: add first version of run_script()