How to define a mesh?
Following my previous answer here, you want to get the mesh (one of them), not define it. To do that you should use obj.meshes[0] (since usually there is only one mesh). 

You can find the BGE API here. Of particular interest is the KX_GameObject class, where most of BGE coding is actually done.