[SOLVED] Know the location of the active tools panel with python?

Is it possible to know if the active tools panel is on the left or right side through python?

Thanks.

for a in bpy.context.window.screen.areas:
    for r in a.regions:
        if r.type == "TOOLS":
            if r.alignment == "RIGHT":
                print(r.alignment)