diff options
Diffstat (limited to 'pyload/cli/Handler.py')
-rw-r--r-- | pyload/cli/Handler.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pyload/cli/Handler.py b/pyload/cli/Handler.py new file mode 100644 index 000000000..33e5dd8e6 --- /dev/null +++ b/pyload/cli/Handler.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# @author: RaNaN + +class Handler(object): + + def __init__(self, cli): + self.cli = cli + self.init() + + client = property(lambda self: self.cli.client) + input = property(lambda self: self.cli.input) + + + def init(self): + pass + + + def onChar(self, char): + pass + + + def onBackSpace(self): + pass + + + def onEnter(self, inp): + pass + + + def setInput(self, inp=""): + self.cli.setInput(inp) + + + def backspace(self): + self.cli.setInput(self.input[:-1]) + + + def renderBody(self, line): + """ gets the line where to render output and should return the line number below its content """ + return line + 1 |