1. 程式人生 > >python執行shell指令碼

python執行shell指令碼

轉自https://www.cnblogs.com/djcsch2001/articles/2025944.html

# -*- coding: utf-8 -*-
import os
file = os.popen("ipconfig")
print(file.read())