Re: [Tutor] dictionary manipulation

2006-07-26 Thread Alan Gauld
> for key in sorted(result.keys): a sorted list of keys Oops, that should of course be: for key in sorted(result.keys() ): Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] dictionary manipulation

2006-07-26 Thread Alan Gauld
Chris, You seem to be going through several hoops that you don't need here. Let the data structures do the work of storage and extract the data you want in its various pieces. You are getting the entire data set in a string then trying to pick out the bits you want, that defeats the purpose of havi

Re: [Tutor] dictionary manipulation

2006-07-26 Thread Kent Johnson
Chris Hallman wrote: > > I need some suggestions on how to work with a dictionary. I've got a > program that builds a dictionary. I need to be able to manipulate the > different keys and data so that I can write the output to a file AND > utilize the smtplib to send the data in an email. I had p

Re: [Tutor] dictionary manipulation

2006-07-26 Thread David Heiser
Title: Message   Chris,   This looks similar to what I do for my job. I would be happy to help you, if I can.   My first question is, how would you like the output to look? Can you manually create a model of the email text you want to send?   My second question is, can you create the email

Re: [Tutor] dictionary manipulation

2006-07-26 Thread Bob Gailer
Chris Hallman wrote: > > I need some suggestions on how to work with a dictionary. I've got a > program that builds a dictionary. I need to be able to manipulate the > different keys and data so that I can write the output to a file AND > utilize the smtplib to send the data in an email. I had p

[Tutor] dictionary manipulation

2006-07-26 Thread Chris Hallman
I need some suggestions on how to work with a dictionary. I've got a program that builds a dictionary. I need to be able to manipulate the different keys and data so that I can write the output to a file AND utilize the smtplib to send the data in an email. I had problems using the data in the dict