def from_private_key_file(cls, filename, password=None):
key = cls(filename=filename, password=password)<EOL>return key<EOL>
Create a key object by reading a private key file.  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).  Through the magic of python, this factory method will
exist in all subclasses of PKey (such as L{RSAKey} or L{DSSKey}), but
is useless on the abstract PKey class.

@param filename: name of the file to read
@type filename: str
@param password: an optional password to use to decrypt the key file,
    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 file
@raise PasswordRequiredException: if the private key file is
    encrypted, and C{password} is C{None}
@raise SSHException: if the key file is invalid