2013-11-06 00:02:31 +02:00
|
|
|
#!/usr/bin/env python3
|
2014-01-24 19:07:58 +02:00
|
|
|
########################################################################
|
|
|
|
# Kuule osta elevant ära #
|
|
|
|
# #
|
|
|
|
# #
|
2016-08-03 19:46:55 +03:00
|
|
|
# Author: Arti Zirk <arti.zirk@gmail.com> #
|
|
|
|
# License: Do What the Fuck You Want to Public License #
|
2014-01-24 19:07:58 +02:00
|
|
|
# #
|
|
|
|
########################################################################
|
2013-11-06 00:02:31 +02:00
|
|
|
|
2014-01-24 19:07:58 +02:00
|
|
|
import sys
|
|
|
|
|
|
|
|
asi = " ".join(sys.argv[1:])
|
2014-05-18 13:50:39 +03:00
|
|
|
if not asi.strip(): # argumente pole, kasuta vaikimisi asja
|
2014-01-24 19:07:58 +02:00
|
|
|
asi = "elevant"
|
|
|
|
|
2014-05-18 13:50:39 +03:00
|
|
|
|
|
|
|
abi = """Kuule osta elevant ära
|
2014-01-24 19:07:58 +02:00
|
|
|
Kasutus: main.py [asi | -h | --abi]"""
|
|
|
|
if asi in ("-h", "--abi",):
|
|
|
|
print(abi)
|
|
|
|
exit(0)
|
|
|
|
|
|
|
|
print("> Kuule osta " + asi + " ära!")
|
2013-11-06 00:02:31 +02:00
|
|
|
while True:
|
2013-11-06 00:25:05 +02:00
|
|
|
try:
|
|
|
|
vastus = input("< ").lower()
|
2014-05-18 13:50:39 +03:00
|
|
|
print("> Seda räägivad kõik, et {} aga osta {} ära!".format(vastus,
|
|
|
|
asi))
|
2013-11-06 00:25:05 +02:00
|
|
|
except (EOFError, KeyboardInterrupt) as e:
|
2014-01-24 19:07:58 +02:00
|
|
|
print("\033[4D> Mis sul viga on, et " + asi + " ei taha ??")
|
2013-11-06 00:25:05 +02:00
|
|
|
exit()
|
|
|
|
except:
|
|
|
|
print("Error, mingine kala ujus sisse")
|
2013-11-06 00:32:31 +02:00
|
|
|
exit()
|