From c46dff6bcd491ff60754a6586db398ca6013d48c Mon Sep 17 00:00:00 2001 From: clamsawd Date: Sun, 15 Nov 2015 16:42:14 +0100 Subject: [PATCH] PauseExit=input() --- ip2e-config.py | 10 +++++++--- ip2e-daemon.py | 7 ++++--- ip2e-log.py | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ip2e-config.py b/ip2e-config.py index d927ce7..3878e82 100755 --- a/ip2e-config.py +++ b/ip2e-config.py @@ -20,7 +20,7 @@ if sys.version_info<(3,0): print ("") print ("You need python 3.x to run this program.") print ("") - exit(1) + exit() #Function to clear screen def ClearScreen(): @@ -75,11 +75,13 @@ if os.path.isfile("ip2e.conf"): print ("") print ("Test OK") print ("") + PauseExit=input("Press ENTER to exit ") except: print ("") print ("Failed to connect ("+SmtpFromEmail+")") print ("") - exit(0) + PauseExit=input("Press ENTER to exit ") + exit() #Set variables of 'ip2e.conf' ClearScreen() @@ -121,7 +123,7 @@ print ("") TestConnection=input("[Default: y] Test connection with your configuration (y/n): ") if TestConnection == "n": print ("Exiting...") - exit(0) + exit() else: exec(open("ip2e.conf").read()) #Import smtplib @@ -136,7 +138,9 @@ else: print ("") print ("Test OK") print ("") + PauseExit=input("Press ENTER to exit ") except: print ("") print ("Failed to connect ("+SmtpFromEmail+")") print ("") + PauseExit=input("Press ENTER to exit ") diff --git a/ip2e-daemon.py b/ip2e-daemon.py index bbfd9be..12658e2 100755 --- a/ip2e-daemon.py +++ b/ip2e-daemon.py @@ -24,7 +24,7 @@ if sys.version_info<(3,0): print ("") print ("You need python 3.x to run this program.") print ("") - exit(1) + exit() #Function to clear screen def ClearScreen(): @@ -63,7 +63,8 @@ else: print ("") print ("You can create it if you run 'ip2e-config.py'") print ("") - exit(0) + PauseExit=input("Press ENTER to exit ") + exit() #Check if exists 'IP.log' if os.path.isfile("IP.log"): @@ -101,7 +102,7 @@ try: os.system("color 6") except: print ("Error importing native color scheme") - exit(1) + exit() #Check if exists a previous log.file if os.path.isfile("ip2e.log"): diff --git a/ip2e-log.py b/ip2e-log.py index b346e1b..5087929 100755 --- a/ip2e-log.py +++ b/ip2e-log.py @@ -20,7 +20,7 @@ if sys.version_info<(3,0): print ("") print ("You need python 3.x to run this program.") print ("") - exit(1) + exit() #Function to clear screen def ClearScreen():