看板 Python 關於我們 聯絡資訊
假設我在目前目錄下有一個執行檔 a.out 如果下 os.system("./a.out") 將會出現下列錯誤訊息: sh: ./a.out: not found 如果把 ./ 換成絕對路徑也不行… @@ 在前面加 sh 也不行 所以如果想執行目前目錄底下的執行檔該怎麼下才正確呢? 話說用 python 來代替 shell script 是不是一個不太好的主意啊? 大家覺得勒 我是覺得 string 的處理上 loop 等等都比直接寫 shell script 簡單得多 -- Team Programming Dragon http://graphics.csie.ntu.edu.tw/~jonathan/tpd/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 157.82.147.209
bizkit:python代替shell script很棒啊 我就是這樣用 09/30 17:11
bizkit:好久沒寫bash了XD 09/30 17:11