import subprocess, sys, shlex
try:
process = (subprocess.Popen(shlex.split(command),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True, cwd="Pass desired directory in as string variable")
stdout, stderr = process.communicate()
use the shlex to build your command, and subprocess to execute it in the command prompt.
subprocess.Popen Allows you to set the current working directory and set a pipe up for IPC.