code: def sign_file(self, message_file, key_id=None, passphrase=None,
                    clearsign=True, detach=False, binary=False):
          '''
          Make a signature.
  
          :param message_file: File-like object for sign
          :param key_id: Key for signing, default will be used if null
          :param passphrase: Key password
          :param clearsign: Make a clear text signature
          :param detach: Make a detached signature
          :param binary: If false, create ASCII armored output
          :rtype: SignResult
          '''
          args = ['-s' if binary else '-sa']
          if detach:
              args.append('--detach-sign')
          if clearsign:
              args.append('--clearsign')
          if key_id:
              #args += ('--default-key', key_id)
              args += ('--local-user', key_id)
          return self.execute(SignResult(), args, passphrase, message_file, Truef sign_file(self, message_file, key_id=None, passphrase=None,
                    clearsign=True, detach=False, binary=False):
          '''
          Make a signature.
  
          :param message_file: File-like object for sign
          :param key_id: Key for signing, default will be used if null
          :param passphrase: Key password
          :param clearsign: Make a clear text signature
          :param detach: Make a detached signature
          :param binary: If false, create ASCII armored output
          :rtype: SignResult
          '''
          args = ['-s' if binary else '-sa']
          if detach:
              args.append('--detach-sign')
          if clearsign:
              args.append('--clearsign')
          if key_id:
              #args += ('--default-key', key_id)
              args += ('--local-user', key_id)
          return self.execute(SignResult(), args, passphrase, message_file, True)
docs: Make a signature.
  
          :param message_file: File-like object for sign
          :param key_id: Key for signing, default will be used if null
          :param passphrase: Key password
          :param clearsign: Make a clear text signature
          :param detach: Make a detached signature
          :param binary: If false, create ASCII armored output
          :rtype: SignResult