Пример #1
0
 def __init__(self):
     cc = configCreator()
     cd = configDefaults()
     for i in ['PATH', 'STAMP_LOGO']:
         if cc.getValue(i):
             setattr(self, i, cc.getValue(i))
         else:
             setattr(self, i, getattr(cd, i))
Пример #2
0
 def __init__(self):
     cc = configCreator()
     cd = configDefaults()
     for i in ['SOURSE', 'COMPONENT', 'WORKPART', 'APP']:
         if cc.getValue(i):
             setattr(self, i, cc.getValue(i))
         else:
             setattr(self, i, getattr(cd, i))
Пример #3
0
 def __init__(self):
     cc = configCreator()
     cd = configDefaults()
     for i in ['PATH']:
         if cc.getValue(i):
             setattr(self, i, cc.getValue(i))
         else:
             setattr(self, i, getattr(cd, i))
     self.root = os.path.join(os.path.dirname(sys.argv[0]), 'config')
     if not os.path.exists(self.root):
         os.mkdir(self.root)
     self.renderDataFile = os.path.join(self.root, 'renderData.json')
     if not os.path.exists(self.renderDataFile):
         renderData = []
         json.dump(renderData, open(self.renderDataFile, 'w'), indent=4)
     self.tasks = json.load(open(self.renderDataFile))