I'm assuming your niceName is what you want to sort on:
niceName = icon.partition(".")[0]
This means you basically just want to sort on the filenames in general. So
you would want to change this from:
for icon in icons:
to...
for icon in sorted(icons):
Is that what you are after? Now your loop will be creating symbolButtons in
alphabetic order of the filename
On Thu, Mar 7, 2013 at 10:51 AM, ImLearning Python
<[email protected]>wrote:
> I'm so sorry Justin, I'm just learning Python, I did all of the tutorials
> from Jeremy Ernst and read the book "Maya Python for Games and Film" but
> it's still hard for me to understand everyhting...
>
> At the moment I just want to put my icons in alphabetic order in my
> window... It's something easy to explain but I really don't get it...
>
> I'm sorry to be boring and I hope you could help me...
>
> Many thanks,
>
> mAtt.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.