Changeset 21357
- Timestamp:
- 11/10/16 03:25:10 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/io/loadvars.py
r21303 r21357 6 6 from re import findall 7 7 from os import path 8 from collections import OrderedDict 8 9 from whichdb import whichdb 9 10 from collections import OrderedDict … … 98 99 listtype=curclass.groups[keylist[0]].classtype 99 100 if listtype=='dict': 100 nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [ {}for i in range(max(1,len(curclass.groups)))]101 nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [OrderedDict() for i in range(max(1,len(curclass.groups)))] 101 102 else: 102 103 nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [getattr(__import__(listtype),listtype)() for i in range(max(1,len(curclass.groups)))] … … 106 107 Tree=nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] 107 108 else: 108 109 curclass=NCFile.groups[classtree[mod][0]] 109 110 nvdict['md'].__dict__[mod] = getattr(classtype[mod][1],classtype[mod][0])() 110 111 Tree=nvdict['md'].__dict__[classtree[mod][0]]
Note:
See TracChangeset
for help on using the changeset viewer.