Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8520b94

Browse files
committed
Display helpful message; print repr() of return value so the whitespace is clearer
1 parent ccab001 commit 8520b94

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/curses/textpad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@ def edit(self, validate=None):
163163
def test_editbox(stdscr):
164164
ncols, nlines = 9, 4
165165
uly, ulx = 15, 20
166+
stdscr.addstr(uly-2, ulx, "Use Ctrl-G to end editing.")
166167
win = curses.newwin(nlines, ncols, uly, ulx)
167168
rectangle(stdscr, uly-1, ulx-1, uly + nlines, ulx + ncols)
168169
stdscr.refresh()
169170
return Textbox(win).edit()
170171

171172
str = curses.wrapper(test_editbox)
172-
print str
173+
print 'Contents of text box:', repr(str)

0 commit comments

Comments
 (0)