<p>I am programming a website in which users will have a number of settings, such as their choice of colour scheme, etc. I'm happy to store these as plain text files, and security is not an issue.</p>

<p>The way I currently see it is: there is a dictionary, where all the keys are users and the values are dictionaries with the users' settings in them.</p>

<p>For example, userdb["bob"]["colour_scheme"] would have the value "blue".</p>

<p>What is the best way to store it on file? Pickling the dictionary?</p>

<p>Are there better ways of doing what I am trying to do?</p>

Using
cPickle
on the dictionary would be my choice. Dictionaries are a natural fit for these kind of data, so given your requirements I see no reason not to use them. That, unless you are thinking about reading them from non-python applications, in which case you'd have to use a language neutral text format. And even here you could get away with the pickle plus an export tool.