def run_command(run_path, command):
# pwd = os.getcwd()
os.chdir(run_path)
sys.stdout = open('stdout.txt', 'w')
p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
logging.debug(p.stdout.read().decode('utf-8'))
p.wait()
# os.chdir(pwd)
return run_path