import commandscmd = "ifconfig br0 | grep ‘inet addr‘ | sed ‘s/^.*addr://g‘ |sed ‘s/ Bcast:.*$//g‘"(status, ip) = commands.getstatusoutput(cmd)
原文地址:https://www.cnblogs.com/sea-stream/p/9939569.html
时间: 2024-10-11 23:10:47
import commandscmd = "ifconfig br0 | grep ‘inet addr‘ | sed ‘s/^.*addr://g‘ |sed ‘s/ Bcast:.*$//g‘"(status, ip) = commands.getstatusoutput(cmd)
原文地址:https://www.cnblogs.com/sea-stream/p/9939569.html