def from_private_key(cls, file_obj, password=None):
key = cls(file_obj=file_obj, password=password)<EOL>return key<EOL>
Create a key object by reading a private key from a file (or file-like)
object.  If the private key is encrypted and C{password} is not C{None},
the given password will be used to decrypt the key (otherwise
L{PasswordRequiredException} is thrown).

@param file_obj: the file to read from
@type file_obj: file
@param password: an optional password to use to decrypt the key, if it's
    encrypted
@type password: str
@return: a new key object based on the given private key
@rtype: L{PKey}

@raise IOError: if there was an error reading the key
@raise PasswordRequiredException: if the private key file is encrypted,
    and C{password} is C{None}
@raise SSHException: if the key file is invalid