Thank you Justin for your help. My bad, it does seems I have omitted out a portion of where/how gen_dict comes about but in any case, it comes from an iterator. And since I am only getting 2 parameters - namely the object name and the user name affiliated with it, I made it into a dictionary, as this is the best solution I can come up with.
Even so, if this time round I had wanted to add in an additional parameter, say the size of each item such that it is (this is not a dict yet): (1 MiB) "item_C_v001" : "jack" (5 MiB) "item_C_v002" : "kris" (1 MiB) "item_A_v003" : "john", (1 MiB) "item_B_v006" : "peter", (2 MiB) "item_A_v005" : "john", (1 MiB) "item_A_v004" : "dave" While I am able to make my output as follows: Item Name | No. of Vers. | User item_A | 3 | dave(1, 1MiB), john(2, 3MiB) item_B | 1 | peter(1, 1MiB) item_C | 2 | jack(1, 1MiB), kris(1, 5MiB) My code is as follows: http://pastebin.com/G8WVzE3e Wondering if you could take a look and see if my method is a good way of doing so? I am having some difficulties of seeing how I can get the dictionaries I have created to 'link' / make use of each other, because say if I am trying to sort it by data size in descending order, it is not working even if I try to sort it by the values.. Pardon me if my code is not fanciful -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/557625a8-3f4f-412f-aced-e16ce966d37d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
