MCPcopy
hub / github.com/Sathvik-Rao/ClipCascade / run

Method run

ClipCascade_Desktop/src/cli/tray.py:56–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 self.update_stats() # Start the stats update thread
55
56 def run(self):
57 Echo("-" * 53)
58 self.menu_items, self.numbered_menu = self.create_menu()
59
60 while not self.loop_terminate:
61 Echo("\n")
62
63 self.display_menu()
64
65 # input
66 choice = input("Choice: \n")
67 Echo("Please wait...")
68 if choice == "": # refresh
69 continue
70
71 if choice.isdigit():
72 choice = int(choice)
73 else:
74 Echo("Invalid choice. Please enter a number.")
75
76 if choice in self.numbered_menu:
77 fun = self.numbered_menu[choice][1]
78 if fun is not None:
79 fun()
80 else:
81 Echo("Invalid choice.")
82
83 def get_max_width(self):
84 """Determine the maximum width of menu item texts."""

Callers 9

runMethod · 0.95
iFunction · 0.45
hbFunction · 0.45
mainMethod · 0.45
__init__Method · 0.45
center_windowFunction · 0.45
notifyMethod · 0.45
open_locationMethod · 0.45
execute_commandMethod · 0.45

Calls 3

create_menuMethod · 0.95
display_menuMethod · 0.95
EchoClass · 0.90

Tested by

no test coverage detected