Re: sorting tuples...

2005-10-03 Thread nidhog
Steve Holden wrote: > Dan Sommers wrote: > > On 27 Sep 2005 19:01:38 -0700, > > [EMAIL PROTECTED] wrote: > > > > > >>with the binary stuff out of the way, what i have is this string data: > > > > > >>20050922 # date line > >>mike > >>mike's message... > >>20040825 # date line > >>jeremy > >>jeremy

Re: sorting tuples...

2005-09-27 Thread nidhog
Magnus Lycka wrote: > Why? It seems you are trying to use a string as some kind of container, > and Python has those in the box. Just use a list of tuples, rather than > a list of strings. That will work fine for .sort(), and it's much more > convenient to access your data. Using the typical tool

Re: sorting tuples...

2005-09-21 Thread nidhog
Thank you very much. I'll look into this immediately. I edited my code earlier and came up with stringing the groups (200501202010, sender, message_string) into one string delimited by '%%%'. I could then sort the messages with the date string at the beginning as the one being sorted with the b

sorting tuples...

2005-09-17 Thread nidhog
Hello guys, I made a script that extracts strings from a binary file. It works. My next problem is sorting those strings. Output is like: snip 200501221530 John *** long string here *** 200504151625 Clyde *** clyde's long string here *** 200503130935 Jeremy *** jeremy string here **