I need help to translate this 2.4 scripts to 2.5

Hi some time ago i made two simple scripts for blender 2.49 now i can´t use it in blender 2.5. I am sure that the changes to adapt them would be very simple for someone who nows the new api.
Could anyone take a look to them?