我得到 FileNotFoundError:[WinError 2]系統找不到指定的文件子模塊FileNotFoundError
from subprocess import check_output
out = check_output([r'dir',r'C:\Users\Lenovo\Downloads\WS*'])
Directory of C:\Users\Lenovo\Downloads
04-02-2014 20:59 11,682,838 WS BPEL 2.pdf
09-04-2015 04:22 7,758,832 WS-BPEL 2.0 Beginners Guide.epub
10-04-2015 20:33 19,605,151 WS-BPEL 2.0 Beginners Guide. Juric.pdf
16-08-2015 18:58 <DIR> WSDL
3 File(s) 39,046,821 bytes
1 Dir(s) 243,993,673,728 bytes free
我在做什麼錯在這裏
'check_output(cmd,shell = True)'。子進程不知道'*'。殼牌。 –
嗨Rogalski謝謝你,你可以作出回答,所以我可以將它標記爲正確的 –