Changeset 439
- Timestamp:
- 10/14/09 14:19:04 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/parameters.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/parameters.py
r382 r439 159 159 160 160 @staticmethod 161 def read_from_str(s tr):162 """ 163 ParameterSet definition s trshould be a Python dict definition161 def read_from_str(s): 162 """ 163 ParameterSet definition s should be a Python dict definition 164 164 string, containing objects of types int, float, str, list, 165 165 dict plus the classes defined in this module, `Parameter`, … … 187 187 pi=numpy.pi)) 188 188 try: 189 D = eval(s tr, global_dict)190 except SyntaxError :191 raise SyntaxError("Invalid string for ParameterSet definition: %s " % str)189 D = eval(s, global_dict) 190 except SyntaxError, e: 191 raise SyntaxError("Invalid string for ParameterSet definition: %s\n%s" % (s,e)) 192 192 return D or {} 193 193
