For some (small) programs I'm writing in Python, I'd like to be able to set, store and retrieve user preferences in a file in a portable (multi-platform) way.
I'm obviously thinking about a very simple ConfigParser file like "~/.program" or "~/.program/program.cfg".
Is os.path.expanduser()
the best way for achieving this or there's something more easy/straightforward that I'm missing?