Better way of invoking python scripts