우리는 dos 명령/dos 모드를 실행하는 스크립트를 Python으로 작성할 수 있습니까? 예 : 나는 도스 mode.I에서만 실행하기로 명령python에서 dos 명령을 실행하는 방법은 무엇입니까?
megarec.exe -cleanflash .1
그것은 내가 그것을 할 위 procedure.can을 자동화하는 스크립트를 작성해야 manually.Now 할 수 있나요?
우리는 dos 명령/dos 모드를 실행하는 스크립트를 Python으로 작성할 수 있습니까? 예 : 나는 도스 mode.I에서만 실행하기로 명령python에서 dos 명령을 실행하는 방법은 무엇입니까?
megarec.exe -cleanflash .1
그것은 내가 그것을 할 위 procedure.can을 자동화하는 스크립트를 작성해야 manually.Now 할 수 있나요?
import subprocess
ch=subprocess.Popen("megarec.exe -cleanflash .1",shell=True,stdout=subprocess.PIPE,stderr=subrocess.PIPE)
output,err=ch.communicate()
if output:
print "success:",output
else:
print "error:",error
'subprocess.check_call ([ "megarec.exe", "-cleanflash", "0.1"])' –
감사 나에게 물어 마음을 놓지 마! 그것은 실제로 dos를 입력하고 실행합니까 ?? –
윈도우에 대해서는 거의 알지 못하지만 그래, 작동해야한다는 것을 확실히 알고있는 한 가지 방법입니다.) –