import subprocess
import sys
f = open('IPList.txt')
for line in f:
subprocess.call("nslookup", line, shell=True)
#print (line)
f.close()
上述程序不起作用。获取以下错误:
=========================================================================================================
PS C:\Python34> .\Python testnslookup.py
Traceback (most recent call last):
File "testnslookup.py", line 7, in <module>
subprocess.call("nslookup", line, shell=True)
File "C:\Python34\lib\subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Python34\lib\subprocess.py", line 767, in __init__
raise TypeError("bufsize must be an integer")
TypeError: bufsize must be an integer
=========================================================================================================
尝试将所有
call
非关键字参数放入列表中相关问题 更多 >
编程相关推荐