object/vertex position, UV map manipulation

I want to make an auto-texturer for realtime but Im not that familiar with python out of realtime. Here are the three things that i need:

Get the position of the selected object.

Get the position of the vertices of each face of the selected object.

Set the position of the UV coords of each face.

thanks