Export script doesn't show up in a menu
The error is in the menu function itself here:

def menu_func(self, context):
    self.layout.operator(object.bl_idname, text="YMesh (.ymesh)");


it should be:

def menu_func(self, context):
    self.layout.operator(exportymesh.bl_idname, text="YMesh (.ymesh)");


the reason is, you need to pass on the name of the operator as a string to the self.layout.operator() function. The name you get by using the .idname property, but of course you need to call the idname of the right class! Your class is called exportymesh, not object.  :)

also, the execute() function in an operator needs to return a set. To indicate your operator worked, you append this as the last line in the execute function:

return {'FINISHED'}


By the way, Python doesn't need the semicolon at the end of a line. It accepts it, but it is not mandatory.