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 or
        ### doesn't validate

        if value == self.value or not self.validation_command(value):
            return

        ### otherwise set the value

        ## format the value
        formatted_value = self.formatting_command(value)

        ## store the formatted value in the 'value' attribute
        self.value = formatted_value

        ## set formatted value as the entry text
        self.cursor.set(formatted_value)

        ## update the image
        self.update_image()

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

        value (string)
            value to be used as label text.
        
nodezator/widget/stringentry.py