How to use the string property

I take a string property input via the panel but everytime I try to use it, I get the "<built-in function StringProperty " instead of the raw string itself. I am new to Python. Any help is appreciated.


def execute(self, context):            
        start = bpy.types.Scene.my_string_prop[0]
        end = bpy.types.Scene.my_string_prop2[0]   
        print("start: ",start)
        print("end: ",end)
        text_string = ''.join([chr(i) for i in range(ord(start), ord(end) + 1)]) #original
        print("text_string : ",text_string)
        return {'FINISHED'}


start:  <built-in function StringProperty>
end:  <built-in function StringProperty>
Traceback (most recent call last):
  File "C:\Users\asifn\Desktop\Test.blend\Text", line 35, in execute
TypeError: ord() expected string of length 1, but builtin_function_or_method found

location: <unknown location>:-1

location: <unknown location>:-1


def register():
    bpy.types.Scene.my_string_prop = bpy.props.StringProperty \
        name = "Start",
        maxlen = 1,
        default = "!"
    bpy.types.Scene.my_string_prop2 = bpy.props.StringProperty \
        name = "End",
        maxlen = 1,
        default = "!"


class MyPanel(bpy.types.Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_MYPANEL"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        row = layout.row(align=True)
        col = layout.column(align=True)

        col = self.layout.column(align = True)
        col.prop(context.scene, "my_string_prop")
        col.prop(context.scene, "my_string_prop2")

Link to the entire code:

I found the solution on stackoeverflow.
tldr: I had to use context.scene to read the property instead of bpy.types.Scene which is only for creating.

myString = bpy.types.Scene.my_string_prop #wrong
myString = context.scene.my_string_prop #right