<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>def ask_ok(prompt, retries=4, complaint="Yes or no,
please!"):<BR> while
True:<BR> password = input("enter
something")<BR> if password in ('y',
'ye', 'yes'): return True<BR> if
password in ('n', 'no', 'nope'): return
False<BR> retries = retries -
1<BR> if retries <
0:<BR> raise
IOError('refusenik user')<BR>
print(complaint)</FONT></DIV></BODY></HTML>