Readably print out a python dict() sorted by key
<p>I would like to print a python dictionary to a file using PrettyPrinter (for human readability) but have the dictionary be sorted by key in the output file to further improve readability. So:</p>

<pre><code>mydict = {'a':1, 'b':2, 'c':3}
pprint(mydict)
</code></pre>

<p>currently prints to</p>

<pre><code>{'b':2,
 'c':3,
 'a':1}
</code></pre>

<p>I would like to PrettyPrint the dictionary but have it printed out sorted by key eg.</p>

<pre><code>{'a':1,
 'b':2,
 'c':3}
</code></pre>

<p>What is the best way to do this?</p>
