def query(question, default=None): s = question if default: s += " [%s]" % default s += ": " answer = raw_input(s) answer = answer.strip() if not answer: return default return answer
def query(question, default=None): s = question if default: s += " [%s]" % default s += ": " answer = raw_input(s) answer = answer.strip() if not answer: return default return answer