using python script instead of unix commands