[Avida-cvs] [Avida2-svn] r53 - trunk/source/python/AvidaGui2

baerb at myxo.css.msu.edu baerb at myxo.css.msu.edu
Tue Mar 15 12:16:29 PST 2005


Author: baerb
Date: 2005-03-15 15:16:28 -0500 (Tue, 15 Mar 2005)
New Revision: 53

Modified:
   trunk/source/python/AvidaGui2/pyReadFreezer.py
Log:
Minor fixes (be sure dictionary keys are upper case)



Modified: trunk/source/python/AvidaGui2/pyReadFreezer.py
===================================================================
--- trunk/source/python/AvidaGui2/pyReadFreezer.py	2005-03-15 20:13:40 UTC (rev 52)
+++ trunk/source/python/AvidaGui2/pyReadFreezer.py	2005-03-15 20:16:28 UTC (rev 53)
@@ -1,13 +1,12 @@
 # -*- coding: utf-8 -*-
 
-import os,string
+import string
 
 class pyReadFreezer:
 
   def __init__(self, in_file_name = None):
     self.file_name = in_file_name
     self.dictionary = {}
-    print "reading file " + self.file_name
     freezefile = open(self.file_name)
     lines = freezefile.readlines()
     freezefile.close
@@ -21,11 +20,11 @@
       line = line.strip()
       if len(line) > 0:
         if line[0] == "*":
-          section_key = line[1:]
+          section_key = line[1:].upper()
           self.dictionary[section_key] = {}
         else:
           var_name, value = string.split(line)
-          self.dictionary[section_key][var_name] = [value]
-
+          self.dictionary[section_key][var_name.upper()] = value
+	
   def GetDictionary(self):
     return self.dictionary




More information about the Avida-cvs mailing list