summary refs log tree commit diff stats
path: root/doc/print_colors.py
blob: c3508fa6b9ccc5cf3b3a3b24c4f8bed901e2dd80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<
def waitpid_no_intr(pid):
	"""catch interrupts which occur while using os.waitpid"""
	import os, errno

	while True:
		try:
			return os.waitpid(pid, 0)
		except KeyboardInterrupt:
			continue
		except OSError as e:
			if e.errno == errno.EINTR:
				continue
			else:
				raise
p">) | attr) use_default_colors() win.addstr("available colors: %d\n\n" % curses.COLORS) print_all_colors(0) win.addstr("\n\n") print_all_colors(A_BOLD) win.refresh() win.getch()