Example #1
0
	def reroot(self, d):
		"""Recreate this Core's root object."""
		t = d['type']
		a = d['args']
		k = d['kwargs']
		k['core'] = self.proxy
		self.__r = base.create(t, *a, **k)
		self.__p = weakref.proxy(self.__r)
Example #2
0
	def __init__(self, *a, **k):
		"""
		Pass args and kwargs necessary for a base.Factory to create the
		root object to be contained by this core. This can be a config 
		file path or the arguments and kwargs accepted by base.create(), 
		but cannot be a straight type or coreload() will fail.
		"""
		k['core'] = self.proxy
		self.__r = base.create(*a, **k)
		self.__p = weakref.proxy(self.__r)
		Core.__CORES.append(self.proxy)