def tell(name, query=''):
 try:
  cmd = 'tell_{}'.format(name)
  if (cmd in globals()):
   items = globals()[cmd](query)
  else:
   items = [alfred.Item('tell', 'Invalid action "{}"'.format(name))]
 except SetupError as e:
  items = [alfred.Item('error', e.title, e.subtitle, icon='error.png')]
 except Exception as e:
  items = [alfred.Item('error', str(e), icon='error.png')]
 _out(alfred.to_xml(items))

def tell ( name , query = '' ) : try : cmd = 'tell_{}' . format ( name ) if ( cmd in globals ( ) ) : items = globals ( ) [ cmd ] ( query ) else : items = [ alfred . Item ( 'tell' , 'Invalid action "{}"' . format ( name ) ) ] except SetupError as e : items = [ alfred . Item ( 'error' , e . title , e . subtitle , icon = 'error.png' ) ] except Exception as e : items = [ alfred . Item ( 'error' , str ( e ) , icon = 'error.png' ) ] _out ( alfred . to_xml ( items ) )
tell something .