code: def ask(self, question, default=False):
          
          choices = '[%s/%s]' % ('Y' if default else 'y', 'n' if default else 'N')
          while True:
              response = raw_input('%s %s' % (question, choices)).strip()
              if not response:
                  return default
              elif response in 'yYoO':
                  return True
              elif response in 'nN':
                  return False
docs: Ask a y/n question to the user.