I am trying to script Blender for the first time following the documentation
import bpy
def my_handler(scene):
print("Frame Change", scene.frame_current)
bpy.app.handlers.frame_change_pre.append(my_handler)
How can I replace a type of frame handler, respectively clear it, instead of appending to it every time I run the script? I can't directly write into the handler, since it is read only. However closing and reopening the project can not be the answer either.