Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=aea11704b015be5bbff32709bc264222aada53ed
commit aea11704b015be5bbff32709bc264222aada53ed Author: bouleetbil <[email protected]> Date: Wed Jan 11 09:30:55 2012 +0100 fw-lang *draft curses init diff --git a/frugal-tweak-python/fw-lang/fw-lang.py b/frugal-tweak-python/fw-lang/fw-lang.py index 40473df..322f579 100644 --- a/frugal-tweak-python/fw-lang/fw-lang.py +++ b/frugal-tweak-python/fw-lang/fw-lang.py @@ -24,12 +24,39 @@ import sys import os +import curses ConfigKeymap = "/etc/sysconfig/keymap" ConfigLanguage = "/etc/sysconfig/language" -ConfigLanguage = "/etc/profile.d/lang.sh" +ConfigLang = "/etc/profile.d/lang.sh" +win=None + +def curses_init(): + #init ncurses + curses.initscr() + curses.noecho() + curses.cbreak() + stdscr.keypad(1) + +def curses_finally(): + curses.nocbreak() + stdscr.keypad(0) + curses.echo() + curses.endwin() + +def create_window(): + begin_x = 20 ; begin_y = 7 + height = 5 ; width = 40 + global win + win = curses.newwin(height, width, begin_y, begin_x) + +def refresh_window(): + win.refresh() + def main(): - return 0 + curses_init() + curses_finally() + return 0 if __name__ == "__main__": main() _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
