def opt(options, k, defval=''):
 try:
  data = getattr(options, k)
 except:
  return defval
 return n2s(data)

def opt ( options , k , defval = '' ) : try : data = getattr ( options , k ) except : return defval return n2s ( data )
returns an option from an optparse values instance .