   Saving data as a python file(.py)
  I'm thinking of saving my data(c++) as a .py file and want to know what others think, is it a good or bad idea?Write out file to save.Load using boost python and PostMessage.Good idea?   
  I've never embedded a Python interpreter in a C++ program, but I have been working on some projects in Python, and storing data as executable Python code works well for me. It saves me the hassle of writing parser code: I just call execfile() on it.   ;  Why don't you just use a normal serialisation format such as JSON or YAML if you want to store data in a potentially readable format?   ;  Most JSON can be executed immediately in several languages, Python being one of them, so the lines can be a bit blurry there. Either way, Python is pretty readable and quite a bit more flexible. On the other hand, parsing JSON might be easier than embedding an interpreter that does it for you, so yeah, it depends.   ;  I'm a big fan of user-readable serialization to files as a data storage mechanism. Being able to modify save data with a text editor is a good thing. Thus, my configuration file for my project is just a Python dict that I can write out using Python's pprint (pretty-print) module -- granted, the entire project is also written in Python. Obviously this doesn't work for all serialization situations; particularly, if you want to store arbitrary objects with associated functions and references to other objects, a dict is going to be insufficient.   