@commands(u'ety')
@example(u'.ety word')
def f_etymology(bot, trigger):
 word = trigger.group(2)
 try:
  result = etymology(word)
 except IOError:
  msg = (u"Can't connect to etymonline.com (%s)" % (etyuri % word))
  bot.msg(trigger.sender, msg)
  return NOLIMIT
 except (AttributeError, TypeError):
  result = None
 if (result is not None):
  bot.msg(trigger.sender, result)
 else:
  uri = (etysearch % word)
  msg = (u'Can\'t find the etymology for "%s". Try %s' % (word, uri))
  bot.msg(trigger.sender, msg)
  return NOLIMIT

@ commands ( u'ety' ) @ example ( u'.ety word' ) def f_etymology ( bot , trigger ) : word = trigger . group ( 2 ) try : result = etymology ( word ) except IOError : msg = ( u"Can't connect to etymonline.com (%s)" % ( etyuri % word ) ) bot . msg ( trigger . sender , msg ) return NOLIMIT except ( AttributeError , TypeError ) : result = None if ( result is not None ) : bot . msg ( trigger . sender , result ) else : uri = ( etysearch % word ) msg = ( u'Can\'t find the etymology for "%s". Try %s' % ( word , uri ) ) bot . msg ( trigger . sender , msg ) return NOLIMIT
look up the etymology of a word .