Ahenk/opt/ahenk/base/agreement/ask.py
2016-06-30 12:40:29 +03:00

20 lines
465 B
Python
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import sys
import easygui
def ask(content, title):
choice = easygui.ynbox(content, title, ('Evet', 'Hayır'))
if choice:
print('Y')
else:
print('N')
if __name__ == '__main__':
if len(sys.argv) == 3:
try:
ask(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))