def parsePrivateKey(s):
 try:
  return parsePEMKey(s, private=True)
 except:
  return parseXMLKey(s, private=True)

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