pep8 värk

This commit is contained in:
Arti Zirk 2014-05-18 13:50:39 +03:00
parent af2ded0767
commit 1588e7d727
2 changed files with 9 additions and 6 deletions

2
.gitignore vendored
View File

@ -34,3 +34,5 @@ nosetests.xml
.mr.developer.cfg .mr.developer.cfg
.project .project
.pydevproject .pydevproject
.ropeproject

View File

@ -3,19 +3,19 @@
# Kuule osta elevant ära # # Kuule osta elevant ära #
# # # #
# # # #
#Author: Arti Zirk <arti.zirk@gmail.com> # # Author: Arti Zirk <arti.zirk@gmail.com> #
#License: Do What the Fuck You Want to Public License # # License: Do What the Fuck You Want to Public License #
# # # #
######################################################################## ########################################################################
import sys import sys
asi = " ".join(sys.argv[1:]) asi = " ".join(sys.argv[1:])
if not asi.strip(): # argumente pole, kasuta vaikimisi asja if not asi.strip(): # argumente pole, kasuta vaikimisi asja
asi = "elevant" asi = "elevant"
abi="""Kuule osta elevant ära
abi = """Kuule osta elevant ära
Kasutus: main.py [asi | -h | --abi]""" Kasutus: main.py [asi | -h | --abi]"""
if asi in ("-h", "--abi",): if asi in ("-h", "--abi",):
print(abi) print(abi)
@ -25,7 +25,8 @@ print("> Kuule osta " + asi + " ära!")
while True: while True:
try: try:
vastus = input("< ").lower() vastus = input("< ").lower()
print("> Seda räägivad kõik, et " + vastus + " aga osta "+ asi +" ära!") print("> Seda räägivad kõik, et {} aga osta {} ära!".format(vastus,
asi))
except (EOFError, KeyboardInterrupt) as e: except (EOFError, KeyboardInterrupt) as e:
print("\033[4D> Mis sul viga on, et " + asi + " ei taha ??") print("\033[4D> Mis sul viga on, et " + asi + " ei taha ??")
exit() exit()