In blender render, it is ok to render a scene and save the scene image into the local file system with the code shown below
bpy.data.scenes['Scene'].render.filepath = '/home/user/Documents/image.jpg'
bpy.ops.render.render( write_still=True )
Now instead of working on the blender render, I am using the blender game engine to create a game, the blender game engine is working for me. but I I don't know how can to script to save the game screenshot into the local file system?