I’m running Python 2.7 and I’ve got an ObjectListView displaying loads of demographic info. I can get it to sort correctly, but the output is displayed in 100000.0 format. When I convert the integer to a string using the locale module, it sorts the descending strings like 9,181, 9,069, 818, 813, 8,730, etc. Any ideas how to sort like integers, but display the output as comma formatted in the ObjectListView?
I’m running Python 2.7 and I’ve got an ObjectListView displaying loads of demographic info.
Share
Thanks for putting me on the right track! In the end I just ended up adding two lines to the ObjectListView.py source. Around line 3601, I changed the _StringToValue Function to include:
also needed to set locale after the local import, as show above:
Thank you, I’ve been pounding my head on this one for a while now.
Cheers!