2016-08-24 18:05:54 +03:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Author: Volkan Şahin <volkansah.in> <bm.volkansahin@gmail.com>
|
|
|
|
|
2016-06-27 17:20:26 +03:00
|
|
|
import sys
|
|
|
|
import easygui
|
|
|
|
|
|
|
|
|
|
|
|
def ask(content, title):
|
2016-06-30 15:42:01 +03:00
|
|
|
choice = easygui.textbox(msg=title, text=content, codebox=0)
|
2016-06-27 17:20:26 +03:00
|
|
|
if choice:
|
|
|
|
print('Y')
|
|
|
|
else:
|
|
|
|
print('N')
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2016-06-30 15:42:01 +03:00
|
|
|
|
2016-06-27 17:20:26 +03:00
|
|
|
if len(sys.argv) == 3:
|
|
|
|
try:
|
|
|
|
ask(sys.argv[1], sys.argv[2])
|
|
|
|
except Exception as e:
|
|
|
|
print(str(e))
|
|
|
|
else:
|
2016-06-30 15:42:01 +03:00
|
|
|
print('Argument fault. Check your parameters or content of parameters. Parameters: ' + str(sys.argv))
|