Beispiel #1
0
    def succeed(self):
        ## Reference the last message from the spinner list
        self.spinner = self.spinnerList[len(self.spinnerList) - 1]
        self.spinner[0].succeed(self.spinner[1])

        ## Change the count
        Display.Change(1)
Beispiel #2
0
    def __call__(self, message, postMessage):
        ## Check if theres any messages in the spinner list
        if len(self.spinnerList) > 0:
            ## Reference the message from the spinner list
            self.spinner = self.spinnerList[len(self.spinnerList) - 1]

            ## Set the message as successful with the post message
            self.spinner[0].succeed(self.spinner[1])

        ## Create the spinner message
        spinner = Halo(text=message, spinner='dots')

        ## Display the message
        spinner.start()

        ## Add the message to the spinner list
        self.spinnerList.append([spinner, postMessage])

        ## Change the count
        Display.Change(1)