Best way to run shell commands in python