Opening, reading and modifying a "config" file

Hi there. I’ve been wondering if its possible to open a config file (Be it .txt, .cfg or .py), read it’s text (Mostly properties and stuff) and use it to assign properties in the Game Engine? For example, i have an options menu which is diriven mostly by properties, so if the property “shadows” is off, the shadows in game turn off, and so on.

I’ve tried looking at the python API to see if there’s anything, but i’ve ended up more confused. Any help is appreciated :slight_smile:

Blender have a full integration of python.

Is there a module named ConfigParser, is very useful, I use it for things similar to what you need(load the game settings and other stuffs).