(self, pwd)
Set default password for encrypted files.
Set default password for encrypted files.
Set default password for encrypted files .
def setpassword(self, pwd):
        """Set default password for encrypted files."""
        if pwd and not isinstance(pwd, bytes):
            raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__)
        if pwd:
            self.pwd = pwd
        else:
            self.pwd = None
def setpassword ( self , pwd ) : if pwd and not isinstance ( pwd , bytes ) : raise TypeError ( "pwd: expected bytes, got %s" % type ( pwd ) . __name__ ) if pwd : self . pwd = pwd else : self . pwd = None