def script_status(self, script_id):
        """
        Returns the run status of a stored script as well as the
        current values of parameters 0 to 9.

        script_id:= id of stored script.

        The run status may be

        . .
        PI_SCRIPT_INITING
        PI_SCRIPT_HALTED
        PI_SCRIPT_RUNNING
        PI_SCRIPT_WAITING
        PI_SCRIPT_FAILED
        . .

        The return value is a tuple of run status and a list of
        the 10 parameters.  On error the run status will be negative
        and the parameter list will be empty.

        ...
        (s, pars) = pi.script_status(sid)
        ...
        """
        res = yield from self._pigpio_aio_command(_PI_CMD_PROCP, script_id, 0)
        bytes = u2i(res)

        if bytes > 0:

            # Fixme : this sould be the same a _rxbuf
            # data = self._rxbuf(bytes)
            data = yield from self._loop.sock_recv(self.s, bytes)
            while len(data) < bytes:
                b = yield from self._loop.sock_recv(self.s, bytes-len(data))
                data.extend(b)

            pars = struct.unpack('11i', _str(data))
            status = pars[0]
            params = pars[1:]
        else:
            status = bytes
            params = ()
        return status, params
def script_status ( self , script_id ) : res = yield from self . _pigpio_aio_command ( _PI_CMD_PROCP , script_id , 0 ) bytes = u2i ( res ) if bytes > 0 : data = yield from self . _loop . sock_recv ( self . s , bytes ) while len ( data ) < bytes : b = yield from self . _loop . sock_recv ( self . s , bytes - len ( data ) ) data . extend ( b ) pars = struct . unpack ( '11i' , _str ( data ) ) status = pars [ 0 ] params = pars [ 1 : ] else : status = bytes params = ( ) return status , params
Returns the run status of a stored script as well as the
        current values of parameters 0 to 9.

        script_id:= id of stored script.

        The run status may be

        . .
        PI_SCRIPT_INITING
        PI_SCRIPT_HALTED
        PI_SCRIPT_RUNNING
        PI_SCRIPT_WAITING
        PI_SCRIPT_FAILED
        . .

        The return value is a tuple of run status and a list of
        the 10 parameters.  On error the run status will be negative
        and the parameter list will be empty.

        ...
        (s, pars) = pi.script_status(sid)
        ...