[Tutor] string object into reference

Kirk Vander Meulen kvander11 at gmail.com
Tue Jan 17 18:50:09 CET 2006


Hi, just joined.  I've got a question that I'm guessing there's a
ridiculously easy answer to, but I'm having trouble (no excuses, I'm just
dumb!)...

My problem is I want to make a string object into a reference to another
object.  To be more specific, I'm reading through a text file of amino
acids.  The first item on each line is the amino acid name, and a later item
is its exposed surface area.  For each amino acid, I want to add up the
surface area as I go through the text file.  So what I'm doing is, for each
line, assigning the reference 'residue' to the amino acid name.  I'd like to
then make the string referred to by 'residue' (eg, 'CYS' or 'TRP') a
reference to an object that I will subsquently increment by the surface area
value.

Thanks for any help.  Perhaps I just need to be pointed to a relevent thread
or given the correct words to search for in the archives or manual.

Kirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060117/d84b7675/attachment.htm 


More information about the Tutor mailing list