def parseAsPublicKey(s):
 try:
  return parsePEMKey(s, public=True)
 except:
  return parseXMLKey(s, public=True)

def parseAsPublicKey ( s ) : try : return parsePEMKey ( s , public = True ) except : return parseXMLKey ( s , public = True )
parse an xml or pem-formatted public key .