"Trey Keown" <[EMAIL PROTECTED]> wrote
I just spotted something.
> for (tag,val) in attrs.iteritems():
>for tag in window_attrs_key_order:
> print "%s%s = Tk()" %(whitespace, val)
etc...
You set tag and val in the outer loop, then you change
tag in the innrter loop but you never chan
"Trey Keown" <[EMAIL PROTECTED]> wrote
> window_attrs_key_order = ["name", "title", "icon"]
> for (tag,val) in attrs.iteritems():
> for (tag,val) in attrs.iteritems():
> if tag in window_attrs_key_order:
> for tag in window_attrs_key_order:
> if tag == u"name":
> print
> "Trey Keown" <[EMAIL PROTECTED]> wrote
>
>> I would like to know, how can I read (or sort) a dictionary in a
>> certain
>> order?
>
> Dictionaries are by design unsorted and indeed may even change
> their order during their lifetime.
>
>> attrs={u'title': u'example window title', u'name': u'SELF'
"Trey Keown" <[EMAIL PROTECTED]> wrote
> I would like to know, how can I read (or sort) a dictionary in a
> certain
> order?
Dictionaries are by design unsorted and indeed may even change
their order during their lifetime.
> attrs={u'title': u'example window title', u'name': u'SELF', u'icon':
>
Hello.
I would like to know, how can I read (or sort) a dictionary in a certain
order?
say this is my dictionary-
attrs={u'title': u'example window title', u'name': u'SELF', u'icon':
u'e.ico'}
how could I get the data so that u'name' is read first, u'title' second,
and u'icon' third?
thanks so much