Lines Matching refs:curses

28 curses = import_module('curses')  variable
32 import curses.panel
37 return unittest.skipUnless(hasattr(curses, name),
61 curses.setupterm(fd=fd)
75 self.stdscr = curses.initscr()
76 curses.savetty()
79 curses.resetty()
80 curses.endwin()
86 win = curses.newwin(10,10)
87 win = curses.newwin(5,5, 5,5)
88 win2 = curses.newwin(15,15, 5,5)
91 for args in [('a'), ('a', curses.A_BOLD),
92 (4,4, 'a'), (5,5, 'a', curses.A_BOLD)]:
107 stdscr.addnstr('1234', 3, curses.A_BOLD)
109 stdscr.addnstr(5,5, '1234', 3, curses.A_BOLD)
111 stdscr.attron(curses.A_BOLD)
112 stdscr.attroff(curses.A_BOLD)
113 stdscr.attrset(curses.A_BOLD)
115 stdscr.bkgd(' ', curses.A_REVERSE)
117 stdscr.bkgdset(' ', curses.A_REVERSE)
142 stdscr.echochar('a', curses.A_BOLD)
144 stdscr.hline('-', 5, curses.A_BOLD)
146 stdscr.hline(1,1,'-', 5, curses.A_BOLD)
156 stdscr.insnstr('abc', 3, curses.A_BOLD)
158 stdscr.insnstr(5, 5, 'abc', 3, curses.A_BOLD)
161 stdscr.insstr('def', curses.A_BOLD)
163 stdscr.insstr(5, 5, 'def', curses.A_BOLD)
192 stdscr.vline('a', 3, curses.A_STANDOUT)
194 stdscr.chgat(5, 2, 3, curses.A_BLINK)
195 stdscr.chgat(3, curses.A_BOLD)
196 stdscr.chgat(5, 8, curses.A_UNDERLINE)
197 stdscr.chgat(curses.A_BLINK)
201 stdscr.vline(1,1, 'a', 3, curses.A_STANDOUT)
216 for func in [curses.baudrate, curses.beep, curses.can_change_color,
217 curses.cbreak, curses.def_prog_mode, curses.doupdate,
218 curses.flash, curses.flushinp,
219 curses.has_colors, curses.has_ic, curses.has_il,
220 curses.isendwin, curses.killchar, curses.longname,
221 curses.nocbreak, curses.noecho, curses.nonl,
222 curses.noqiflush, curses.noraw,
223 curses.reset_prog_mode, curses.termattrs,
224 curses.termname, curses.erasechar]:
226 if hasattr(curses, 'filter'):
227 curses.filter()
228 if hasattr(curses, 'getsyx'):
229 curses.getsyx()
232 if curses.tigetstr("cnorm"):
233 curses.curs_set(1)
234 curses.delay_output(1)
235 curses.echo() ; curses.echo(1)
240 curses.getwin(f)
242 curses.halfdelay(1)
243 curses.intrflush(1)
244 curses.meta(1)
245 curses.napms(100)
246 curses.newpad(50,50)
247 win = curses.newwin(5,5)
248 win = curses.newwin(5,5, 1,1)
249 curses.nl() ; curses.nl(1)
250 curses.putp(b'abc')
251 curses.qiflush()
252 curses.raw() ; curses.raw(1)
253 if hasattr(curses, 'setsyx'):
254 curses.setsyx(5,5)
255 curses.tigetflag('hc')
256 curses.tigetnum('co')
257 curses.tigetstr('cr')
258 curses.tparm(b'cr')
259 if hasattr(curses, 'typeahead'):
260 curses.typeahead(sys.__stdin__.fileno())
261 curses.unctrl('a')
262 curses.ungetch('a')
263 if hasattr(curses, 'use_env'):
264 curses.use_env(1)
268 if not curses.has_colors():
270 curses.start_color()
271 curses.init_pair(2, 1,1)
272 curses.color_content(1)
273 curses.color_pair(2)
274 curses.pair_content(curses.COLOR_PAIRS - 1)
275 curses.pair_number(0)
277 if hasattr(curses, 'use_default_colors'):
278 curses.use_default_colors()
282 curses.keyname(13)
286 curses.has_key(13)
290 (availmask, oldmask) = curses.mousemask(curses.BUTTON1_PRESSED)
293 curses.mouseinterval(10)
295 curses.ungetmouse(0, 0, 0, 0, curses.BUTTON1_PRESSED)
296 m = curses.getmouse()
300 w = curses.newwin(10, 10)
301 p = curses.panel.new_panel(w)
303 with self.assertRaises(curses.panel.error,
309 w = curses.newwin(10, 10)
310 p = curses.panel.new_panel(w)
322 w = curses.newwin(10, 10)
323 panel = curses.panel.new_panel(w)
332 w = curses.newwin(10, 10)
333 panel = curses.panel.new_panel(w)
338 curses.is_term_resized(*self.stdscr.getmaxyx())
342 curses.resize_term(*self.stdscr.getmaxyx())
347 lines, cols = curses.LINES, curses.COLS
350 curses.resizeterm(new_lines, new_cols)
352 self.assertEqual(curses.LINES, new_lines)
353 self.assertEqual(curses.COLS, new_cols)
356 curses.ungetch(1025)
360 b = curses.tparm(curses.tigetstr("cup"), 5, 3)
367 box = curses.textpad.Textbox(stdscr, insert_mode=True)
377 for name in curses.ascii.controlnames:
378 self.assertTrue(hasattr(curses.ascii, name), name)
387 check(curses.ascii.isalnum, b.isalnum())
388 check(curses.ascii.isalpha, b.isalpha())
389 check(curses.ascii.isdigit, b.isdigit())
390 check(curses.ascii.islower, b.islower())
391 check(curses.ascii.isspace, b.isspace())
392 check(curses.ascii.isupper, b.isupper())
394 check(curses.ascii.isascii, i < 128)
395 check(curses.ascii.ismeta, i >= 128)
396 check(curses.ascii.isctrl, i < 32)
397 check(curses.ascii.iscntrl, i < 32 or i == 127)
398 check(curses.ascii.isblank, c in ' \t')
399 check(curses.ascii.isgraph, 32 < i <= 126)
400 check(curses.ascii.isprint, 32 <= i <= 126)
401 check(curses.ascii.ispunct, c in string.punctuation)
402 check(curses.ascii.isxdigit, c in string.hexdigits)
405 self.assertFalse(curses.ascii.isalnum(i))
406 self.assertFalse(curses.ascii.isalpha(i))
407 self.assertFalse(curses.ascii.isdigit(i))
408 self.assertFalse(curses.ascii.islower(i))
409 self.assertFalse(curses.ascii.isspace(i))
410 self.assertFalse(curses.ascii.isupper(i))
412 self.assertFalse(curses.ascii.isascii(i))
413 self.assertFalse(curses.ascii.isctrl(i))
414 self.assertFalse(curses.ascii.iscntrl(i))
415 self.assertFalse(curses.ascii.isblank(i))
416 self.assertFalse(curses.ascii.isgraph(i))
417 self.assertFalse(curses.ascii.isprint(i))
418 self.assertFalse(curses.ascii.ispunct(i))
419 self.assertFalse(curses.ascii.isxdigit(i))
421 self.assertFalse(curses.ascii.ismeta(-1))
424 ascii = curses.ascii.ascii
430 ctrl = curses.ascii.ctrl
437 alt = curses.ascii.alt
443 unctrl = curses.ascii.unctrl