Use the seqdict.py package: What is it? http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/seqdict/
Downloads: http://home.arcor.de/wolfgang.grafen/Python/Modules/seqdict/seqdict-0.3.zip http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/HTML/HTMLDoc.zip http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/HTML/Seqdict.html http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/HTML/Mseqdict.html Sorry, this link is broken - have to fix it asap. http://home.arcor.de/wolfgang.grafen/Python/Modules/Modules.html seqdict.py has been successfully used in several projects... and it is *easy* and flexible. Regards Wolfgang Kamilche wrote: > I have a code snippet here that prints a dict in an arbitrary order. > (Certain keys first, with rest appearing in sorted order). I didn't > want to subclass dict, that's error-prone, and overkill for my needs. I > just need something that returns a value like dict.__str__, with a key > ordering I specify. > SNIP -- http://mail.python.org/mailman/listinfo/python-list