How do I select an object in python, blender 2.5

My question is already pretty much stated in the subject line. I´m writing a script to rotate a series of objects. Now I need the script to select one of these objects,… but: HOW do I do this? I can find the answer for blender 2.49 but not for 2.5 :spin:

look in my post:
http://blenderartists.org/forum/showthread.php?t=164765&page=17
#321