user: What is Space(bpy_struct) and how is it used in Blender Python scripting?

assistant: # Space(bpy_struct)

base class — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct")

subclasses —
[`SpaceClipEditor`](bpy.types.SpaceClipEditor.html#bpy.types.SpaceClipEditor "bpy.types.SpaceClipEditor"), [`SpaceConsole`](bpy.types.SpaceConsole.html#bpy.types.SpaceConsole "bpy.types.SpaceConsole"), [`SpaceDopeSheetEditor`](bpy.types.SpaceDopeSheetEditor.html#bpy.types.SpaceDopeSheetEditor "bpy.types.SpaceDopeSheetEditor"), [`SpaceFileBrowser`](bpy.types.SpaceFileBrowser.html#bpy.types.SpaceFileBrowser "bpy.types.SpaceFileBrowser"), [`SpaceGraphEditor`](bpy.types.SpaceGraphEditor.html#bpy.types.SpaceGraphEditor "bpy.types.SpaceGraphEditor"), [`SpaceImageEditor`](bpy.types.SpaceImageEditor.html#bpy.types.SpaceImageEditor "bpy.types.SpaceImageEditor"), [`SpaceInfo`](bpy.types.SpaceInfo.html#bpy.types.SpaceInfo "bpy.types.SpaceInfo"), [`SpaceNLA`](bpy.types.SpaceNLA.html#bpy.types.SpaceNLA "bpy.types.SpaceNLA"), [`SpaceNodeEditor`](bpy.types.SpaceNodeEditor.html#bpy.types.SpaceNodeEditor "bpy.types.SpaceNodeEditor"), [`SpaceOutliner`](bpy.types.SpaceOutliner.html#bpy.types.SpaceOutliner "bpy.types.SpaceOutliner"), [`SpacePreferences`](bpy.types.SpacePreferences.html#bpy.types.SpacePreferences "bpy.types.SpacePreferences"), [`SpaceProperties`](bpy.types.SpaceProperties.html#bpy.types.SpaceProperties "bpy.types.SpaceProperties"), [`SpaceSequenceEditor`](bpy.types.SpaceSequenceEditor.html#bpy.types.SpaceSequenceEditor "bpy.types.SpaceSequenceEditor"), [`SpaceSpreadsheet`](bpy.types.SpaceSpreadsheet.html#bpy.types.SpaceSpreadsheet "bpy.types.SpaceSpreadsheet"), [`SpaceTextEditor`](bpy.types.SpaceTextEditor.html#bpy.types.SpaceTextEditor "bpy.types.SpaceTextEditor"), [`SpaceView3D`](bpy.types.SpaceView3D.html#bpy.types.SpaceView3D "bpy.types.SpaceView3D")

*class* bpy.types.Space(*bpy_struct*)
:   Space data for a screen area

    show_locked_time
    :   Synchronize the visible timeline range with other time-based editors

        Type:
        :   boolean, default False

    show_region_header
    :   Type:
        :   boolean, default False

    type
    :   Space data type

        Type:
        :   enum in [Space Type Items](bpy_types_enum_items/space_type_items.html#rna-enum-space-type-items), default `'EMPTY'`, (readonly)

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   [type](#bpy.types.Space.type "bpy.types.Space.type")

    *classmethod* draw_handler_add(*callback*, *args*, *region_type*, *draw_type*)
    :   Add a new draw handler to this space type.
        It will be called every time the specified region in the space type will be drawn.
        Note: All arguments are positional only for now.

        Parameters:
        :   - **callback** (*Callable**[**...**,* *Any**]*) – A function that will be called when the region is drawn.
              It gets the specified arguments as input, it’s return value is ignored.
            - **args** (*tuple**[**Any**,* *...**]*) – Arguments that will be passed to the callback.
            - **region_type** (*str*) – The region type the callback draws in; usually `WINDOW`. ([`bpy.types.Region.type`](bpy.types.Region.html#bpy.types.Region.type "bpy.types.Region.type"))
            - **draw_type** (*str*) – Usually `POST_PIXEL` for 2D drawing and `POST_VIEW` for 3D drawing. In some cases `PRE_VIEW` can be used. `BACKDROP` can be used for backdrops in the node editor.

        Returns:
        :   Handler that can be removed later on.

        Return type:
        :   object

    *classmethod* draw_handler_remove(*handler*, *region_type*)
    :   Remove a draw handler that was added previously.

        Parameters:
        :   - **handler** (*object*) – The draw handler that should be removed.
            - **region_type** (*str*) – Region type the callback was added to.