You can write whole command as a string and just use shlex.split() on it. Or specify shell=True in Popen().