Beispiel #1
0
    def __getattr__(self, name):
        assert (name != 'table')
        assert (name != 'parent')
        #return super(PyfabSpyderConfigState, self).__getattr__(name)
        assert (u'table' not in self.table)
        #print('PyfabSpyderConfigState getattr on config state: {}'.format(name))
        #print('  PyfabSpyderConfigState config state is: {}'.format(self.table))

        #return self.table[unicode(name)]
        try:
            return self.parent.get_option(name)
        except (cp.NoOptionError, cp.NoSectionError):
            return get_default_options()[name]
Beispiel #2
0
  def __getattr__(self, name):
    assert(name != 'table')
    assert(name != 'parent')
      #return super(PyfabSpyderConfigState, self).__getattr__(name)
    assert(u'table' not in self.table)
    #print('PyfabSpyderConfigState getattr on config state: {}'.format(name))
    #print('  PyfabSpyderConfigState config state is: {}'.format(self.table))

    #return self.table[unicode(name)]
    try:
      return self.parent.get_option(name)
    except (cp.NoOptionError, cp.NoSectionError):
      return get_default_options()[name]
Beispiel #3
0
 def get_table(self):
     r = {}
     for k, v in get_default_options().iteritems():
         r[k] = getattr(self, k)
     return r
Beispiel #4
0
 def get_table(self):
   r = {}
   for k,v in get_default_options().iteritems():
     r[k] = getattr(self, k)
   return r