def get_input(message, prompt, default='', cleaner=required):
  print message
  real_prompt = '%s [%s]: ' % (prompt, default)
  s = raw_input(real_prompt)
  if not s and default:
    s = default
  try:
    o = cleaner(s)
    print '==============================='
  except __HOLE__, e:
    print 
    print 'Error:', e.message
    o = get_input(message, prompt, default, cleaner)
  return o
dataset/ETHPy150Open CollabQ/CollabQ/build.py/get_input