Replaced the native commands to read a file
This commit is contained in:
parent
0ef4b20d37
commit
8229d467e1
|
@ -74,15 +74,12 @@ def writeip2ecf():
|
||||||
os.remove("ip2e-conf.py")
|
os.remove("ip2e-conf.py")
|
||||||
createip2ecf()
|
createip2ecf()
|
||||||
writeip2ecf()
|
writeip2ecf()
|
||||||
exec(open("ip2e-conf.py").read())
|
|
||||||
|
|
||||||
#Show the configuration
|
#Show the configuration
|
||||||
ClearScreen()
|
ClearScreen()
|
||||||
print ("")
|
print ("")
|
||||||
print ("ip2e-config v"+version+" - Current config.file")
|
print ("ip2e-config v"+version+" - Current config.file")
|
||||||
print ("")
|
print ("")
|
||||||
if os.name == "posix":
|
readfile=open('ip2e-conf.py', 'r')
|
||||||
os.system("cat ip2e-conf.py")
|
print(readfile.read())
|
||||||
elif os.name == "nt":
|
readfile.close()
|
||||||
os.system("type ip2e-conf.py")
|
|
||||||
print ("")
|
|
||||||
|
|
|
@ -72,10 +72,9 @@ else:
|
||||||
if os.path.isfile("ip2e.log"):
|
if os.path.isfile("ip2e.log"):
|
||||||
print ("ip2e.log exists")
|
print ("ip2e.log exists")
|
||||||
ClearScreen()
|
ClearScreen()
|
||||||
if os.name == "posix":
|
readfile=open('ip2e.log', 'r')
|
||||||
os.system("cat ip2e.log")
|
print(readfile.read())
|
||||||
elif os.name == "nt":
|
readfile.close()
|
||||||
os.system("type ip2e.log")
|
|
||||||
else:
|
else:
|
||||||
ClearScreen()
|
ClearScreen()
|
||||||
print ("")
|
print ("")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user