def get_input(msg, color='green', output=None): ''' py2, py3 compatibility function to obtain user input. @params msg: message prompt for user @rtype str: input from user ''' if not output: output = Message() try: value = raw_input(' %s %s' % (output.color_func(color, '*'), msg)) except NameError: value = input(' %s %s' % (output.color_func(color, '*'), msg)) return value