diff options
author | makefu <github@syntax-fehler.de> | 2011-07-24 02:41:13 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-07-24 02:41:13 +0200 |
commit | 531d9d4309fa09e893a19fdcf8165dc7bf1b3731 (patch) | |
tree | b4172c2eec1ae842c3b0726fd2e91a5974557323 /cholerab/cholerab-live/cholerab.py | |
parent | 10788dffb408325cb6e73fa4154ce9e5d3ac10ad (diff) |
added curses stuff
cholerab-live/view.py: now able to write basic utf-8 on the plane,
handles some rudimentary colors
handles backspace correctly
Diffstat (limited to 'cholerab/cholerab-live/cholerab.py')
-rwxr-xr-x[-rw-r--r--] | cholerab/cholerab-live/cholerab.py | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/cholerab/cholerab-live/cholerab.py b/cholerab/cholerab-live/cholerab.py index 4739d9cf..0ac44e09 100644..100755 --- a/cholerab/cholerab-live/cholerab.py +++ b/cholerab/cholerab-live/cholerab.py @@ -1,10 +1,23 @@ +#!/usr/bin/python2 +# -*- coding: utf-8 -*- +import curses,time from view import CursesView - -a = CursesView() -a.start() -a.write_char(5,5,'p') -a.write_char(6,5,'e') -a.write_char(7,5,'n') -a.write_char(8,5,'i') -a.write_char(9,5,'s') -a.join() +import logging +logging.basicConfig(filename='here.log',level=logging.DEBUG) +log = logging.getLogger('main') +def main(scr): + log.debug('started main') + a = CursesView(scr=scr) + a.start() + log.debug + a.write_char(5,5,'p') + a.write_char(6,5,'e') + a.write_char(7,5,'n') + a.write_char(8,5,'i') + a.write_char(9,5,'s') + a.write_str(5,6,'¯\(°_o)/¯',user=2) + for i in range(7,11): + time.sleep(2) + a.write_str(5,i,'¯\(°_o)/¯',user=3) + a.join() +curses.wrapper(main) |