MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / pick_from_list

Function pick_from_list

Scripts/Developer Base/Mobile Desktop.py:1424–1435  ·  view source on GitHub ↗
(prompt: str, items: List[str])

Source from the content-addressed store, hash-verified

1422# Menu helpers
1423# ----------------------------
1424def pick_from_list(prompt: str, items: List[str]) -> Optional[str]:
1425 if not items:
1426 return None
1427 for i, d in enumerate(items, 1):
1428 print(f" {i}) {d}")
1429 try:
1430 idx = int(input("\n" + prompt).strip())
1431 if 1 <= idx <= len(items):
1432 return items[idx - 1]
1433 return None
1434 except Exception:
1435 return None
1436
1437# ----------------------------
1438# Actions

Callers 10

action_installFunction · 0.70
action_remove_systemFunction · 0.70
action_settingsFunction · 0.70
action_vncFunction · 0.70
action_x11Function · 0.70
action_programs_removeFunction · 0.70
action_updateFunction · 0.70
action_extras_menuFunction · 0.70
action_launcherFunction · 0.70

Calls 2

printFunction · 0.85
inputFunction · 0.85

Tested by

no test coverage detected