slotUI/SlotCli.py

changeset 56
a20f59a3016c
parent 55
9293f3efcc06
child 58
042c490fdfaa
child 59
361bc4602cf7
equal deleted inserted replaced
55:9293f3efcc06 56:a20f59a3016c
61 def cleartop(self): 61 def cleartop(self):
62 self.scr.addstr(0,0, "%80s" % "Live monitor running, press keys to control or (q)uit") 62 self.scr.addstr(0,0, "%80s" % "Live monitor running, press keys to control or (q)uit")
63 self.scr.addstr(1,0, "%80s" % " ") 63 self.scr.addstr(1,0, "%80s" % " ")
64 64
65 def readName(self, slot): 65 def readName(self, slot):
66 self.scr.nodelay(0) # enable delay on readkey
66 curses.echo() 67 curses.echo()
67 self.scr.addstr(0,0, "Enter Name for Controller %i [%s]:" % ( 68 self.scr.addstr(0,0, "Enter Name for Controller %i [%s]:" % (
68 slot + 1, 69 slot + 1,
69 self.slot[slot]["name"]), 70 self.slot[slot]["name"]),
70 curses.color_pair(1)) 71 curses.color_pair(1))
73 if name != "": 74 if name != "":
74 self.slot[slot]["name"] = name 75 self.slot[slot]["name"] = name
75 self.cleartop() 76 self.cleartop()
76 self.scr.refresh() 77 self.scr.refresh()
77 curses.noecho() 78 curses.noecho()
79 self.scr.nodelay(1) # disable delay on readkey
78 80
79 def monitor(self): 81 def monitor(self):
80 """ 82 """
81 Live Monitor on the console 83 Live Monitor on the console
82 Keyboard loop to control it??? 84 Keyboard loop to control it???

mercurial