I want something along the following lines:
import bpy
object = bpy.data.objects['Cube']
bpy.context.scene.objects.active = object
bpy.ops.transform.rotate(value=0.638031, axis=(-0.818828, 0.361665, -0.445779), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
But I still have to select the object manually. How can I make the object active using python?