Store a script for later execution.

        script:= the script text as a series of bytes.

        Returns a >=0 script id if OK.

        ...
        sid = pi.store_script(
         b'tag 0 w 22 1 mils 100 w 22 0 mils 100 dcr p0 jp 0')
        ...
770332
def store_script(self, script):
        
        if len(script):
            res = yield from self._pigpio_aio_command_ext(_PI_CMD_PROC, 0, 0,
                                                          len(script),
                                                          [script])
            return _u2i(res)
        else:
            return 0
577006
private Object getScriptResult(String script, ScriptEngine engine) throws ScriptException {
        String scriptToExecute = script.substring(script.indexOf(":") + 1);
        return engine.eval(scriptToExecute);
    }
534448
def to_script_code(skip_separator_index = 0)
      payload = to_payload
      if p2wpkh?
        payload = Script.to_p2pkh(chunks[1].pushed_data.bth).to_payload
      elsif skip_separator_index > 0
        payload = subscript_codeseparator(skip_separator_index)
      end
      Bitcoin.pack_var_string(payload)
    end
1236505
function(script) {
			if (script.loader !== this) { return script.loader.load(script); }

			Loader.loaded = false;
			if (this.loaded[script.id]) { return true; }
			if (this.failed[script.id]) {
				throw new Error('No such file: ' + script.url);
			}
			this.pending[script.id] = script;
			return false;
		}
1154923
def getscript(self, name):
        
        code, data, content = self.__send_command(
            "GETSCRIPT", [name.encode("utf-8")], withcontent=True)
        if code == "OK":
            lines = content.splitlines()
            if self.__size_expr.match(lines[0]) is not None:
                lines = lines[1:]
            return u"\n".join([line.decode("utf-8") for line in lines])
        return None
1158293
def Serialize(self, writer):
        
        self.SerializeUnsigned(writer)
        writer.WriteByte(1)
        self.Script.Serialize(writer)
626381
def script_data
      unless @script_data
        @script_data = {}

        traverse = lambda do |node|
          case node.name
          when 'script', 'table'
            unless node.xpath('*[@key]').empty?
              hash = {}

              node.elements.each do |element|
                hash[element['key']] = traverse.call(element)
              end

              hash
            else
              array = []

              node.elements.each do |element|
                array << traverse.call(element)
              end

              array
            end
          when 'elem'
            node.inner_text
          else
            raise(NotImplementedError,"unrecognized XML NSE element: #{node}")
          end
        end

        @node.xpath('script').each do |script|
          @script_data[script['id']] = traverse.call(script)
        end
      end

      return @script_data
    end
1051013
def script(self, s):
        
        try:
            script = self._network.script.compile(s)
            script_info = self._network.contract.info_for_script(script)
            return Contract(script_info, self._network)
        except Exception:
            return None
130803
function decompressScript(script, br) {
  // Decompress the script.
  switch (br.readU8()) {
    case 0: {
      const hash = br.readBytes(20, true);
      script.fromPubkeyhash(hash);
      break;
    }
    case 1: {
      const hash = br.readBytes(20, true);
      script.fromScripthash(hash);
      break;
    }
    case 2:
    case 3:
    case 4:
    case 5: {
      br.offset -= 1;
      const data = br.readBytes(33, true);
      // Decompress the key. If this fails,
      // we have database corruption!
      const key = decompressKey(data);
      script.fromPubkey(key);
      break;
    }
    default: {
      br.offset -= 1;
      const size = br.readVarint() - COMPRESS_TYPES;
      if (size > consensus.MAX_SCRIPT_SIZE) {
        // This violates consensus rules.
        // We don't need to read it.
        script.fromNulldata(EMPTY_BUFFER);
        br.seek(size);
      } else {
        const data = br.readBytes(size);
        script.fromRaw(data);
      }
      break;
    }
  }

  return script;
}
706955
def script_repr(self,imports=[],prefix="    "):
        
        return self.pprint(imports,prefix,unknown_value='',qualify=True,
                           separator="\n")
993464
def _bake_script(script):
    
    if "src" in script.attrs:
        if re.match("https?://", script["src"]):
            script_data = _load_url(script["src"]).read()
        else:
            script_data = _load_file(script["src"]).read()
        script.clear()
        if USING_PYTHON2:
            script.string = "\n" + script_data + "\n"
        else:
            script.string = "\n" + str(script_data) + "\n"
        del script["src"]
        del script["type"]
472559
def script_load(self, script):
        """"""
        sha_digest = sha1(script.encode("utf-8")).hexdigest()
        self.shas[sha_digest] = script
        return sha_digest
323628
def script(self):
        """"""
        # The script object is cached, since constructing it may involve
        # a number of string-manipulation operations.
        if getattr(self, '_script', None) is None:
            self._script = self._script__getter()
        return self._script
900577
def get_script_str(self, reset=True):
        """"""
        s = "\n".join(l for l in self._lines)
        if reset:
            self.reset()
        return s
771527
def make_sh_address(script_string, witness=False, cashaddr=True):
    '''
    
    '''
    script_bytes = script_ser.serialize(script_string)

    return _ser_script_to_sh_address(
        script_bytes=script_bytes,
        witness=witness,
        cashaddr=cashaddr)
168097
def script_sig=(blob)
      # This is only a setter because of the initial choice to do things
      # eagerly.  Can become an attr_accessor when we move to lazy eval.
      script = Script.new(:blob => blob)
      @script_sig = script.to_s
      @native.script_sig = blob
    end
1201333
async def send_script(self, conn_id, data):
        

        self._ensure_connection(conn_id, True)
        connection_string = self._get_property(conn_id, "connection_string")

        msg = dict(connection_string=connection_string, fragment_count=1, fragment_index=0,
                   script=base64.b64encode(data))
        await self._send_command(OPERATIONS.SEND_SCRIPT, msg, COMMANDS.SendScriptResponse)