subprocess 調用的cmd中含有中文,以下cmd="\cp -f %s %s"%(x, y),y是前臺傳入的中文參數調用Popen致使以下錯誤:execv() arg 2 must contain only stringsshell
以下修改:subprocess.Popen(cmd.encode('utf-8'), shell=True)ide