mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 12:22:28 +03:00
confirmation interface
This commit is contained in:
parent
f64eec9913
commit
6a1e08cf18
1 changed files with 21 additions and 0 deletions
21
opt/ahenk/base/agreement/confirm.py
Executable file
21
opt/ahenk/base/agreement/confirm.py
Executable file
|
@ -0,0 +1,21 @@
|
|||
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))
|
Loading…
Reference in a new issue