change active object

Hello to all.
I am programming a script for Blender 2.5 and I need to change the active object in the scene.
How can I do? :confused:

For example, if you want select an object named “Lamp”:

import bpy
for obj in

Edit: oops Active not select…