Replaced the native commands to read a file

This commit is contained in:
clamsawd 2015-10-29 18:02:23 +01:00
parent 0ef4b20d37
commit 8229d467e1
2 changed files with 6 additions and 10 deletions

View File

@ -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()

View File

@ -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 ("")