當我在 使用python 的 python
os.system(r'"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"')chrome
來打開應用的時候,第一次 執行的時候,沒有問題,屢次或者再次執行可能就會出現下面的狀況了報錯了:api
ERROR:in_progress_cache_impl.cc(189)] Cache is not initialized, cannot Retriit
Could not read download entries from file because there was a read failureio
或者是 執行了打開 了 應用了, 接下來的 代碼,沒有起效果。file
我剛開始覺得 是 其餘代碼的 不兼容的問題, 原來不是。。。im
改成 :兼容
win32api.ShellExecute(0, 'open', 'D:/Program Files (x86)/open/launcher.exe', '','',1)
便可。
os.system 感受適合第一次 打開應用 這樣的場景。