import os
import sys
import time
import myconfig
b = ['123']
a = os.path.abspath(myconfig.__file__)
print(a)
b[-1]=os.path.getmtime(a)
print(b)
while True:
a = os.path.abspath(myconfig.__file__)
mtime = os.path.getmtime(a)
if mtime != b[-1]:
del sys.modules['myconfig']
import myconfig
b[-1]=mtime
print(b)
print(myconfig.ip)
time.sleep(2)