def set(self, value, custom_command=True):
        """Set obj value.

        value (string)
            value to be used as label text.
        """
        ### ensure value argument received is a string

        if type(value) is not str:

            ## report problem
            print("'value' received must be of 'str' type")

            ## exit method by returning early
            return

        ### return earlier if value is already set

        if value == self.get():
            return

        ### otherwise set the value

        ## set value as the search box text
        self.cursor.set(value)

        ### also, if requested, execute the custom command
        if custom_command:
            self.on_input(value)
Set obj value.

        value (string)
            value to be used as label text.
        
nodezator/our3rdlibs/searchbox.py