我的代码是这样的
from socket import gethostbyname, gethostname
with open('LoggedIn.csv', 'r') as csvfile:
aList = []
for line in csvfile.readlines():
array = line.split(',')
aList.append(array[2])
ip = gethostbyname(gethostname())
if ip in aList:
x = 1
else:
x = 0
当我得到用户的ip地址并且在我的登录.csv提交if语句只返回false。在
谢谢你!在
目前没有回答
相关问题 更多 >
编程相关推荐