You can do this by adding an event handler to the frame change event.
import bpy
def my_handler(scene):
fm = bpy.data.scenes['Scene'].frame_current
if fm >= 1:
lampStrength = 100
if fm >= 50:
lampStrength = 200
if fm >= 100:
lampStrength = 300
if fm >= 150:
lampStrength = 400
scene.objects['Point'].data.node_tree.nodes['Emission'].inputs['Strength'].default_value=lampStrength
print("lamp strength: " + str(lampStrength))
def register():
bpy.app.handlers.frame_change_post.append(my_handler)
def unregister():
bpy.app.handlers.frame_change_post.remove(my_handler)
if __name__ == "__main__":
register()
*Credit for frame change portion of script here:* https://blender.stackexchange.com/questions/27465/running-a-script-for-each-frame