From 661443206611ac0baabd7bb7f064841b70c422d0 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Fri, 29 Nov 2013 01:16:55 +0100 Subject: [PATCH] added new frontend "clish" which is a curses based interface to linspector --- linspector/frontends/clish.py | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 linspector/frontends/clish.py diff --git a/linspector/frontends/clish.py b/linspector/frontends/clish.py new file mode 100644 index 0000000..2414622 --- /dev/null +++ b/linspector/frontends/clish.py @@ -0,0 +1,47 @@ +""" +cLish is the Curses based Linspector Interactive Shell. + +This will become a curses based commandline interface to Linspector. + +Copyright (c) 2011-2013 by Johannes Findeisen and Rafael Timmerberg + +This file is part of Linspector (http://linspector.org). + +Linspector is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + +import curses + +from logging import getLogger + +from linspector.frontends.frontend import Frontend + +__version__ = "0.0.0" + +logger = getLogger(__name__) + + +class ClishFrontend(Frontend): + def __init__(self, linpsector_interface): + super(ClishFrontend, self) + + self.screen = curses.initscr() + + self.screen.border(0) + self.screen.addstr(12, 25, "Linspector with curses... yeah!") + self.screen.refresh() + self.screen.getch() + + curses.endwin() + pass \ No newline at end of file