摘要:
import os, re# execute command, and return the outputdef execCmd(cmd): r = os.popen(cmd) text = r.read() r.close() return text# write "dat... 阅读全文
摘要:
Windows下2种方法:1.使用拨号上网的话,一般都有一个本地ip和一个外网ip,使用python可以很容易的得到这两个ip使用gethostbyname和gethostbyname_ex两个函数可以实现import socketlocalIP = socket.gethostbyname(s... 阅读全文