MCPcopy Index your code
hub / github.com/pyload/pyload / onChar

Method onChar

pyLoadCli.py:231–249  ·  view source on GitHub ↗

default no special handling for single chars

(self, char)

Source from the content-addressed store, hash-verified

229 print "\033[" + str(self.inputline) + ";0H"
230
231 def onChar(self, char):
232 """ default no special handling for single chars """
233 if char == "1":
234 self.setHandler(AddPackage)
235 elif char == "2":
236 self.setHandler(ManageFiles)
237 elif char == "3":
238 self.setHandler(ManageFiles)
239 self.bodyHandler.target = Destination.Collector
240 elif char == "4":
241 self.client.togglePause()
242 self.setInput()
243 elif char == "5":
244 self.client.kill()
245 self.client.close()
246 sys.exit()
247 elif char == "6":
248 os.system('clear')
249 sys.exit()
250
251 def onEnter(self, inp):
252 pass

Callers 1

startMethod · 0.45

Calls 6

setHandlerMethod · 0.95
setInputMethod · 0.95
togglePauseMethod · 0.45
killMethod · 0.45
closeMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected