def PresentDialog(message, choices, default_choice_index=0):
 to_eval = u"confirm('{0}', '{1}', {2})".format(EscapeForVim(ToUnicode(message)), EscapeForVim(ToUnicode(u'\n'.join(choices))), (default_choice_index + 1))
 try:
  return (GetIntValue(to_eval) - 1)
 except KeyboardInterrupt:
  return (-1)

def PresentDialog ( message , choices , default_choice_index = 0 ) : to_eval = u"confirm('{0}', '{1}', {2})" . format ( EscapeForVim ( ToUnicode ( message ) ) , EscapeForVim ( ToUnicode ( u'\n' . join ( choices ) ) ) , ( default_choice_index + 1 ) ) try : return ( GetIntValue ( to_eval ) - 1 ) except KeyboardInterrupt : return ( - 1 )
presents the user with a dialog where a choice can be made .