mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-19 01:40:16 +01:00
#1194 test python dialogs
This commit is contained in:
parent
58384cd712
commit
4a634725af
@ -586,7 +586,7 @@ echo ""
|
||||
echo "*** RASPIBLITZ EXTRAS ***"
|
||||
|
||||
# for setup schell scripts
|
||||
sudo apt-get -y install dialog bc
|
||||
sudo apt-get -y install dialog bc python3-dialog
|
||||
|
||||
# enable copy of blockchain from 2nd HDD formatted with exFAT
|
||||
sudo apt-get -y install exfat-fuse
|
||||
|
31
home.admin/config.scripts/blitz.ip2tor.py
Normal file
31
home.admin/config.scripts/blitz.ip2tor.py
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import locale
|
||||
from dialog import Dialog
|
||||
|
||||
# display config script info
|
||||
if len(sys.argv) <= 1 or sys.argv[1] == "-h" or sys.argv[1] == "help":
|
||||
print("manage ip2tor subscriptions for raspiblitz")
|
||||
print("blitz.ip2tor.py menu")
|
||||
sys.exit(1)
|
||||
|
||||
# basic settings
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
###############
|
||||
# MENU
|
||||
###############
|
||||
|
||||
if sys.argv[1] == "menu":
|
||||
|
||||
d = Dialog(dialog="dialog",autowidgetsize=True)
|
||||
d.set_background_title("IP2TOR Subscription Service")
|
||||
code, tag = d.menu("OK, then you have two options:",
|
||||
choices=[("(1)", "Leave this fascinating example"),
|
||||
("(2)", "Leave this fascinating example")])
|
||||
if code == d.OK:
|
||||
print("OK --> ")
|
||||
print(tag)
|
||||
else:
|
||||
print("Cancel")
|
Loading…
Reference in New Issue
Block a user