I'm trying to write a script to add rigid body objects to all objects in the scene. I found this question helpful: How do I add a rigidbody to an object with python?
But when I try the solutions I get a 'context is incorrect' error. I have tried changing the context:
bpy.context.area.type = "VIEW_3D" but I still get the error. What is the correct context?