aboutsummaryrefslogtreecommitdiff
path: root/inputs.py
diff options
context:
space:
mode:
authorLionel <lionel.miquel46@gmail.com>2018-10-16 23:09:26 +0200
committerLionel <lionel.miquel46@gmail.com>2018-10-16 23:09:26 +0200
commit480a2935e0eba6fe2577b10f317f2fdbea55d7ce (patch)
tree5058e857a3027cb0912c03a9aa99b1881ee11d5b /inputs.py
parent32aa9e84ee635b37f4cff37112e3e62837c914f4 (diff)
downloadrandopitons-480a2935e0eba6fe2577b10f317f2fdbea55d7ce.tar.gz
randopitons-480a2935e0eba6fe2577b10f317f2fdbea55d7ce.zip
presque fini wlh
Diffstat (limited to 'inputs.py')
-rw-r--r--inputs.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/inputs.py b/inputs.py
index cc00de3..3b47bef 100644
--- a/inputs.py
+++ b/inputs.py
@@ -2,10 +2,12 @@ import getpass
import colorcode as clc
import errmsg as e
+
def mapfileinput():
maptype = 0
print clc.bold+"\n Which map file extension you would want to download ?"+clc.endc
- print """1. gpx (GPS Exchange Format)
+ print """
+ 1. gpx (GPS Exchange Format)
2. trk (CompeGPS Land Track File)
3. kml (Keyhole Markup Language)\n"""
@@ -16,13 +18,17 @@ def mapfileinput():
except (KeyboardInterrupt, SystemExit):
print e.sigkill
exit()
+ except SyntaxError:
+ print "Defaulting to gpx. If this isn't what you wanted, you can always interrupt the script by pressing "+clc.bold+clc.okblue+"CTRL+C"+clc.endc
+ maptype=1
return maptype
def regioninput():
zone = 0
print clc.bold+"\n Which zone you would want to download ?"+clc.endc
- print """1. Cirque de Cilaos (Cilaos Circus)
+ print """
+ 1. Cirque de Cilaos (Cilaos Circus)
2. Cirque de Mafate (Mafate's Circus)
3. Cirque de Salazie (Salazie's Circus)
4. Est (East)
@@ -41,7 +47,7 @@ def regioninput():
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 "+clc.bold+"CTRL+C"+clc.endc)
+ print("\nDefaulting to All. If this isn't what you wanted, you can always interrupt the script by pressing "+clc.bold+clc.okblue+"CTRL+C"+clc.endc)
zone = 10;
except NameError:
print "\nPlease enter a number between 1 and 10."
@@ -49,9 +55,15 @@ def regioninput():
return zone
def loginmail():
- MAIL=raw_input("Your email to log in to randopitons.re : ")
+ try:
+ MAIL=raw_input("Your email to log in to randopitons.re : ")
+ except KeyboardInterrupt:
+ print e.sigkill
return MAIL
def loginpass():
- PSW=getpass.getpass(prompt="Your password to log in to randopitons.re: ")
- return PASS
+ try:
+ PSW=getpass.getpass(prompt="Your password to log in to randopitons.re: ")
+ except KeyboardInterrupt:
+ print e.sigkill
+ return PSW