Added fixes for py3 problems

This commit is contained in:
Manuel Cortez 2016-12-18 18:03:08 -06:00
parent 7425a888de
commit 0e1183ecd6
2 changed files with 7 additions and 7 deletions

View File

@ -394,11 +394,11 @@ readonly: whether to accept new text
if ord(nc) in (194, 195):
nc = chr(self.screen.getch())
buf += nc
try:
tc = buf.decode()
done = True
except:
pass
# try:
tc = buf
done = True
# except:
# pass
return tc
def draw(self):
@ -478,7 +478,7 @@ readonly: whether to accept new text
self.ptr = len(self.currentLine)
else:
self.setStatus("Something odd occured, readLine, down arrow")
elif c in (8, 263): # ^H, backSpace
elif c in (8, curses.KEY_BACKSPACE, 263): # ^H, backSpace
if self.ptr>0:
self.currentLine = u"%s%s" % (self.currentLine[:self.ptr-1],self.currentLine[self.ptr:])
self.ptr -= 1

View File

@ -6,7 +6,7 @@ def read(fname):
setup(
name = "guicurses",
version = "0.4",
version = "0.5.1",
author = "Manuel Cortez",
author_email = "manuel@manuelcortez.net",
description = "A set of utilities for building accessible applications with curses",