def is_dn(s):
 if (s == ''):
  return 1
 rm = dn_regex.match(s)
 return ((rm != None) and (rm.group(0) == s))

def is_dn ( s ) : if ( s == '' ) : return 1 rm = dn_regex . match ( s ) return ( ( rm != None ) and ( rm . group ( 0 ) == s ) )
returns 1 if s is a ldap dn .