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

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