Pythonでコマンドを叩く(Windows) - Qiita

コマンドプロンプトを叩いたようにコマンドを実行するPython。 # coding:utf-8 import os cmd = "ipconfig /all > D:\\ipconfig.txt" os.system(cmd) cmd = "tree D:\\Doc ...