Merge branch 'master' of manuelcortez.net:pi/guicurses

This commit is contained in:
Manuel Cortez 2016-12-18 18:03:50 -06:00
commit 2d65ed6127
2 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,7 @@ enter selects default button or displays error if not one
self.draw() self.draw()
def initialDraw(self): def initialDraw(self):
for i in xrange(0, len(self._controls)): for i in range(0, len(self._controls)):
co = self._controls[i] co = self._controls[i]
c = co[0](screen=self.screen, base=self.base, y=i, can_go_back=self.can_go_back, **co[1]) c = co[0](screen=self.screen, base=self.base, y=i, can_go_back=self.can_go_back, **co[1])
self.controls.append(c) self.controls.append(c)
@ -275,7 +275,7 @@ The following synonyms are supported where possible:
y, x = self.win.getyx() y, x = self.win.getyx()
l = len(self.text) l = len(self.text)
if l < self.maxy: if l < self.maxy:
for i in xrange(l): for i in range(l):
self.win.move(i, 0) self.win.move(i, 0)
self.win.clrtoeol() self.win.clrtoeol()
self.win.addstr(i, 0, ''.join(self.text[i])) self.win.addstr(i, 0, ''.join(self.text[i]))

View File

@ -1,7 +1,7 @@
import sys import sys
import time import time
import curses import curses
import widgets from . import widgets
class Window(object): class Window(object):
@ -11,8 +11,8 @@ class Window(object):
self.screen.keypad(0) self.screen.keypad(0)
self.screen.nodelay(0) self.screen.nodelay(0)
curses.nocbreak() curses.nocbreak()
except Exception,e: except Exception as e:
print "error" print("error")
sys.exit() sys.exit()
quit=exit quit=exit