看板 Python 關於我們 聯絡資訊
我覺得這應該是Windows CMD的問題吧… 我用拖曳的方式把檔案帶到py程式中 在程式中用sys.argv[1]取得拖曳檔案的全路徑 如果路徑中含有非CP950的文字 則程式讀到的路徑就會出現問號,導致程式找不到檔案 這有克服的方法嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 216.151.191.115 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1551259662.A.BD0.html ※ 編輯: shala (216.151.191.115), 02/27/2019 17:28:27
stucode: 這是舊版 Python 用的 drop handler 的問題,你的 Python 02/28 21:31
stucode: 版本是 3.5.3 或 3.6 以上嗎?是的話把登錄註冊表中 02/28 21:31
stucode: Python 檔案用的 drop handler 換成 02/28 21:31
stucode: {BEA218D2-6950-497B-9434-61683EC065FE} 就可以了。 02/28 21:31
shala: 原來如此!感謝 02/28 23:24
cutekid: 推,這個問題還真細,但 stu 大竟然還知道解法,厲害! 03/01 01:07
caron0225: 好猛!! 03/02 10:44