Set active object with python 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?
Just a little update if you are searching for this for 2.80:

The active object has moved from the scene to the new view layers system, as you can have multiple active objects across multiple view layers. 

bpy.context.view_layer.objects.active = some_obj


I would link to the ba post, but offsite linking is hated upon here. 
So, thanks to you, iceythe!