Ahenk/opt/ahenk/base/agreement/confirm.py

22 lines
494 B
Python
Raw Normal View History

2016-08-23 16:50:46 +03:00
import sys
import easygui
def confirm(message, title):
choice = easygui.ccbox(msg=message, title=title, choices=("Evet", "Hayır"))
if choice:
print('Y')
else:
print('N')
if __name__ == '__main__':
if len(sys.argv) == 3:
try:
confirm(sys.argv[1], sys.argv[2])
except Exception as e:
print(str(e))
else:
print('Argument fault. Check your parameters or content of parameters. Parameters: ' + str(sys.argv))