Пример #1
0
 def __init__(self, *args, **kwargs):
     name = kwargs.pop('name', None)
     super().__init__(*args, **kwargs)
     # Register self with workspace
     ws[name] = self
     self.settings = SettingsDict()
     self.comments = 'Using OpenPNM ' + openpnm.__version__
Пример #2
0
 def __init__(self):
     super().__init__()
     self._projects = {}
     self.settings = SettingsDict()
     self.settings['loglevel'] = 30
Пример #3
0
 def __init__(self, *args, **kwargs):
     name = kwargs.pop('name', None)
     super().__init__(*args, **kwargs)
     self.settings = SettingsDict()
     ws[name] = self  # Register self with workspace
     self.settings['_uuid'] = str(uuid.uuid4())
Пример #4
0
 def __new__(cls, *args, **kwargs):
     if Workspace.__instance__ is None:
         Workspace.__instance__ = dict.__new__(cls)
         cls.settings = SettingsDict()
         cls.settings['loglevel'] = 40
     return Workspace.__instance__