<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Looks good. Thanks.<br>
<br>
Eric Dorsey wrote:
<blockquote
 cite="mid:ff0abe560902111926u7c4b2b27seccafe0bb40ce429@mail.gmail.com"
 type="cite">
  <div><span class="Apple-style-span" style="border-collapse: collapse;"><span
 class="Apple-style-span" style="border-collapse: separate;">
  <div><span class="Apple-style-span" style="border-collapse: collapse;">
  <div>&gt;&gt;&gt; config_names = {'start_time': '18:00:00',
'gray_scale': True, 'long': 120.0}</div>
  <div><br>
  </div>
  <div>&gt;&gt;&gt; config_names</div>
  <div>{'start_time': '18:00:00', 'gray_scale': True, 'long': 120.0}</div>
  <div>&gt;&gt;&gt; for i, x in config_names.items():</div>
  <div>... &nbsp; &nbsp; print i, x</div>
  <div>...</div>
  <div>start_time 18:00:00</div>
  <div>gray_scale True</div>
  <div>long 120.0</div>
  <div>&gt;&gt;&gt;</div>
  </span></div>
  </span></span></div>
  <br>
  <div class="gmail_quote">On Wed, Feb 11, 2009 at 7:48 PM, Wayne
Watson <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:sierra_mtnview@sbcglobal.net">sierra_mtnview@sbcglobal.net</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div bgcolor="#ffffff" text="#000000">I have a dictionary that
looks like:<br>
    <br>
config_names = {"start_time : '18:00:00', 'gray_scale' : True, "long":
120.00}<br>
    <br>
If I iterate over it, the entries will appear in any order, as opposed
to what I see above. However, in the config file, I'd like to keep them
in the order above. That I want to write the config file in order.
Perhaps, I need a list like c_names = ["start_time", "gray_scale",
"long"] to get the keys out in the order I need? Maybe there's another
way?<br>
    <div>-- <br>
    <pre cols="76">           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
<font color="#330099">            </font>
    </pre>
    <div style="margin-left: 40px;">
    <div style="margin-left: 80px;"><b>The Richard Feynman
Problem-Solving
Algorithm:</b><br>
    <b>&nbsp; (1) write down the problem;</b><br>
    <b>&nbsp; (2) think very hard;</b><br>
    <b>&nbsp; (3) write down the answer.</b><b><b
 style="color: rgb(204, 51, 204);"><span style="font-family: monospace;"></span></b></b><br>
    </div>
    <b><b style="color: rgb(204, 51, 204);"><span
 style="font-family: monospace;"></span></b></b></div>
    <pre cols="76"><b><b style="color: rgb(204, 51, 204);"><span
 style="font-family: monospace; color: rgb(153, 51, 153);"></span></b></b><b
 style="color: rgb(204, 51, 204);"><span
 style="font-family: monospace; color: rgb(153, 51, 153);"></span></b><span
 style="color: rgb(153, 51, 153);"></span><span
 style="color: rgb(153, 51, 153);"></span><span
 style="color: rgb(153, 51, 153);"></span><b
 style="color: rgb(204, 51, 204);"><span style="font-family: monospace;"></span></b><span
 style="color: rgb(204, 51, 204);"></span>                    Web Page: &lt;<a
 moz-do-not-send="true" href="http://www.speckledwithstars.net/"
 target="_blank">www.speckledwithstars.net/</a>&gt;</pre>
    </div>
    </div>
    <br>
_______________________________________________<br>
Tutor maillist &nbsp;- &nbsp;<a moz-do-not-send="true"
 href="mailto:Tutor@python.org">Tutor@python.org</a><br>
    <a moz-do-not-send="true"
 href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
    <br>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<title>Signature.html</title>
<pre class="moz-signature" cols="76">           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
<font color="#330099">            </font>
</pre>
<div style="margin-left: 40px;">
<div style="margin-left: 80px;"><b>The Richard Feynman Problem-Solving
Algorithm:</b><br>
<b>&nbsp; (1) write down the problem;</b><br>
<b>&nbsp; (2) think very hard;</b><br>
<b>&nbsp; (3) write down the answer.</b><b><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace;"></span></b></b><br>
</div>
<b><b style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace;"></span></b></b></div>
<pre class="moz-signature" cols="76"><b><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace; color: rgb(153, 51, 153);"></span></b></b><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace; color: rgb(153, 51, 153);"></span></b><span
 style="color: rgb(153, 51, 153);"></span><span
 style="color: rgb(153, 51, 153);">
</span><span style="color: rgb(153, 51, 153);"></span><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace;"></span></b><span
 style="color: rgb(204, 51, 204);"></span>                    Web Page: &lt;<a class="moz-txt-link-abbreviated" href="http://www.speckledwithstars.net/">www.speckledwithstars.net/</a>&gt;</pre>
</div>
</body>
</html>