def dostata(dofile, *params):
    cmd = ['C:\\Program Files (x86)\\Stata12\\Stata-64', '/e', 'do', dofile]
for param in params:
    cmd.append(param)
return subprocess.call(cmd, cwd='C:\\location_to_save_log_files')
Run Stata do file from Python