Separate spaws func for direct calling from Python