Save and Load Property Script Help

Hey guys, I just wanted to know if any of you guys could teach me how to write stuff into a file and open stuff from a file for a blender game. Or if someone can give me a script that writes Properties into a file and another script that opens Properties from a file. I know how to read python scripts, but I can’t write them. I’ve tried multiple to write my own saving script, but I keep on failing. Can someone give one that Saves and Opens Properties. THat would help ALOT. If one of you guys want to give me the script write it something like this:

cube = GameLogic.getCurrentScene().getObjectList()["OB ‘meshname’ "]
meshnameProp = meshname.getProperty()

saveFile = open(“Game1.sav”, “w”)

Write header to filen

saveFile.write("Saved File

saveFile.write (‘whatever goes in here’ )

Close save file


Thats how close I can get to writing a script. It’s Probabily wrong badly and if it is, fixit up for me, because I don’t know how… Thanks