Display helpful message; print repr() of return value so the whitespace is clearer

This commit is contained in:
Andrew M. Kuchling 2004-10-19 19:36:09 +00:00
parent ccab001c3d
commit 8520b94750
1 changed files with 2 additions and 1 deletions

View File

@ -163,10 +163,11 @@ if __name__ == '__main__':
def test_editbox(stdscr): def test_editbox(stdscr):
ncols, nlines = 9, 4 ncols, nlines = 9, 4
uly, ulx = 15, 20 uly, ulx = 15, 20
stdscr.addstr(uly-2, ulx, "Use Ctrl-G to end editing.")
win = curses.newwin(nlines, ncols, uly, ulx) win = curses.newwin(nlines, ncols, uly, ulx)
rectangle(stdscr, uly-1, ulx-1, uly + nlines, ulx + ncols) rectangle(stdscr, uly-1, ulx-1, uly + nlines, ulx + ncols)
stdscr.refresh() stdscr.refresh()
return Textbox(win).edit() return Textbox(win).edit()
str = curses.wrapper(test_editbox) str = curses.wrapper(test_editbox)
print str print 'Contents of text box:', repr(str)