def get_attr(cmd):
 if (u'.' in cmd):
  method = frappe.get_attr(cmd)
 else:
  method = globals()[cmd]
 frappe.log((u'method:' + cmd))
 return method

def get_attr ( cmd ) : if ( u'.' in cmd ) : method = frappe . get_attr ( cmd ) else : method = globals ( ) [ cmd ] frappe . log ( ( u'method:' + cmd ) ) return method
get method object from cmd .