URI: 
       ttry.. except wrapper for ncurses.set_curs - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 5251f278e83f2da90a025453b7a6d97513325832
   DIR parent 9ce90932ba6ca7f474f1d7bbae08bffaf28d842e
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Fri, 26 Jul 2013 04:19:41 +0200
       
       ttry.. except wrapper for ncurses.set_curs
       
       Diffstat:
         M gui/gui_text.py                     |      12 +++++++++---
       
       1 file changed, 9 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/gui/gui_text.py b/gui/gui_text.py
       t@@ -21,7 +21,7 @@ class ElectrumGui:
                self.stdscr.keypad(1)
                self.stdscr.border(0)
                self.maxy, self.maxx = self.stdscr.getmaxyx()
       -        curses.curs_set(0)
       +        self.set_cursor(0)
                self.w = curses.newwin(10, 50, 5, 5)
        
                self.wallet = wallet
       t@@ -44,6 +44,12 @@ class ElectrumGui:
                self.num_tabs = len(self.tab_names)
                
        
       +    def set_cursor(self, x):
       +        try:
       +            curses.curs_set(x)
       +        except:
       +            pass
       +
            def restore_or_create(self):
                pass
        
       t@@ -51,12 +57,12 @@ class ElectrumGui:
                pass
            
            def get_string(self, y, x):
       -        curses.curs_set(1)
       +        self.set_cursor(1)
                curses.echo()
                self.stdscr.addstr( y, x, " "*20, curses.A_REVERSE)
                s = self.stdscr.getstr(y,x)
                curses.noecho()
       -        curses.curs_set(0)
       +        self.set_cursor(0)
                return s