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")
|
||||
createip2ecf()
|
||||
writeip2ecf()
|
||||
exec(open("ip2e-conf.py").read())
|
||||
|
||||
#Show the configuration
|
||||
ClearScreen()
|
||||
print ("")
|
||||
print ("ip2e-config v"+version+" - Current config.file")
|
||||
print ("")
|
||||
if os.name == "posix":
|
||||
os.system("cat ip2e-conf.py")
|
||||
elif os.name == "nt":
|
||||
os.system("type ip2e-conf.py")
|
||||
print ("")
|
||||
readfile=open('ip2e-conf.py', 'r')
|
||||
print(readfile.read())
|
||||
readfile.close()
|
||||
|
|
|
@ -72,10 +72,9 @@ else:
|
|||
if os.path.isfile("ip2e.log"):
|
||||
print ("ip2e.log exists")
|
||||
ClearScreen()
|
||||
if os.name == "posix":
|
||||
os.system("cat ip2e.log")
|
||||
elif os.name == "nt":
|
||||
os.system("type ip2e.log")
|
||||
readfile=open('ip2e.log', 'r')
|
||||
print(readfile.read())
|
||||
readfile.close()
|
||||
else:
|
||||
ClearScreen()
|
||||
print ("")
|
||||
|
|
Loading…
Reference in New Issue
Block a user