Python: Make an Operator update UI after executed Example: I want to press a button in the UI and have a label/list change to display below the button. Not on the Operator's F6/Redo panel, but once the Operator has been appended somewhere else in the UI.

So perhaps the question would be if it's possible to use the Operator's draw function somewhere else in the UI (appended or on it's own Panel).

I know it can be done updating a global variable, then using it from the UI code, but I know globals a no-no in general.

Thanks!
You can use static members (class variables) to store information in the operator.

Here's an example that adds a panel and an operator. The operator increases a class variable to reflect how often it has been called. This number is drawn in a panel in the Scene tab of the Properties Edtior:

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout

        layout.operator(SimpleOperator.bl_idname)
        layout.label(str(SimpleOperator.run))


class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    run = 0

    def execute(self, context):
        self.__class__.run += 1
        self.report({'INFO'}, str(self.__class__.run))
        return {'FINISHED'}


def register():
    bpy.utils.register_module(__name__)


def unregister():
    bpy.utils.unregister_module(__name__)


if __name__ == "__main__":
    register()