command = "mymatlabprogram.exe %s"%(arg1,) process = subprocess.Popen(command.split()) stdout, stderr = process.communicate()