私は、次のコマンドをしている:それは私が何をしたいのか<comp name> the entered computer name is not valid... talk to y our admin(53)
の線に沿って出力何かが取得する私は、たとえば、コマンドのステータスコードを取得できますかシェル呼び出しのステータスコードを取得する方法は?
import subprocess
proc = subprocess.Popen(["shutdown", "/m", r"\\<some comp name>", "/s", "/f"], stdout=subprocess.PIPE, shell=True)
コンピュータが存在しない場合であるだろうコマンドの終了コードとそれが出力された場合yes
出力されない場合no
、どのようにしてコマンドのステータスコードを取得できますか?