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

        value (string)
            value to be used as label text.
        """
        ### return earlier if value is already set or
        ### doesn't validate

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

        ### otherwise set the value

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

        ## set formatted value as the entry text
        self.cursor.set(repr(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/literalentry.py