From 6bf912ba61aee249c344ebbd160df0280748fa9e Mon Sep 17 00:00:00 2001 From: Lionel Date: Tue, 16 Oct 2018 15:34:08 +0200 Subject: On avance ça va. Création de errmsg.py qui regroupe les messages d'erreurs qui sont et (seront) récurrents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inputs.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'inputs.py') diff --git a/inputs.py b/inputs.py index 9185cbc..df067d2 100644 --- a/inputs.py +++ b/inputs.py @@ -1,10 +1,11 @@ -import colorcode import getpass +import colorcode as clc +import errmsg as e def mapfileinput(): maptype = 0 - print """\n Which map file extension you would want to download ? - 1. gpx (GPS Exchange Format) + print clc.bold+"\n Which map file extension you would want to download ?"+clc.endc + print """1. gpx (GPS Exchange Format) 2. trk (CompeGPS Land Track File) 3. kml (Keyhole Markup Language)\n""" @@ -13,7 +14,7 @@ def mapfileinput(): maptype = input("You must enter a number between 1 and 3. Your choice ? ") int(maptype) except (KeyboardInterrupt, SystemExit): - print WARNING+"\n\nProcess interrupted by CTRL+C or system."+ENDC + print e.sigkill exit() return maptype @@ -21,8 +22,8 @@ def mapfileinput(): def regioninput(): zone = 0 - print """\n Which zone you would want to download ? - 1. Cirque de Cilaos (Cilaos' Circus) + print clc.bold+"\n Which zone you would want to download ?"+clc.endc + print """1. Cirque de Cilaos (Cilaos Circus) 2. Cirque de Mafate (Mafate's Circus) 3. Cirque de Salazie (Salazie's Circus) 4. Est (East) @@ -38,7 +39,7 @@ def regioninput(): zone = input("You must enter a number between 1 and 10. Your zone [Default is \"All\"]: ") int(zone) except (KeyboardInterrupt, SystemExit): - print WARNING+"\n\nProcess interrupted by CTRL+C or system."+ENDC + print e.sigkill exit() except SyntaxError: print("\nDefaulting to All. If this isn't what you wanted, you can always interrupt the script by pressing "+BOLD+"CTRL+C"+ENDC) -- cgit v1.2.3-70-g09d2