本文整理汇总了Python中pyre.components.Component.Component._init方法的典型用法代码示例。如果您正苦于以下问题:Python Component._init方法的具体用法?Python Component._init怎么用?Python Component._init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyre.components.Component.Component
的用法示例。
在下文中一共展示了Component._init方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
self.weaver = self.inventory.weaver
renderer = self.getCurator().codecs['pml'].renderer
self.weaver.renderer = renderer
return
示例2: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
self._alphabet = list(self.inventory.alphabet)
self._base = len(self._alphabet)
self._hashtable = self._hash(self._alphabet)
return
示例3: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
import journal
theJournal = journal.journal()
device = self.inventory.device.device
theJournal.device = device
Component._init(self)
return
示例4: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
# locate the user database
import os
self.passwd = os.path.join(self.home, self.inventory.passwd)
self._info.log("user database in '%s'" % self.passwd)
# configure the weaver
self.weaver = self.inventory.weaver
self.weaver.language = "python"
return
示例5: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
thickness = self.thickness
width = self.width
height = self.height
darkAngle = self.darkAngle
from sampleassembly.predefined.VanadiumPlate import VanadiumPlate
self._sample = VanadiumPlate( self.name, width, height, thickness, darkAngle )
return
示例6: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
"""
Initialization of the underlying model
"""
Component._init(self)
# Set the parameters of the underlying model
for name in model.params:
if hasattr(self, name):
self.set(name, getattr(self, name))
else:
raise ValueError, "%s not an attribute" % name
return
示例7: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
import sys
if len(self.logfile) == 0:
logstream = sys.stdout
else:
logstream = open( self.logfile, 'w' )
self.logstream = logstream
if self.errlogfile == self.logfile:
if len (self.errlogfile) == 0:
errlogstream = sys.stderr
else:
errlogstream = self.logstream
else:
errlogstream = open(self.errlogfile, 'w')
self.errlogstream = errlogstream
return
示例8: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
# install the ipc support
import pyre.ipc
self.selector = self._createSelector()
self.monitor = self._createPortMonitor()
# create the command dispatcher
self.evaluator = self._createEvaluator()
# initialize the port monitor
self.monitor.install(self.inventory.port)
# register our callbacks
self.selector.notifyWhenIdle(self.onTimeout)
self.selector.notifyOnInterrupt(self.onInterrupt)
self.selector.notifyOnReadReady(self.monitor, self.onConnectionAttempt)
# register the signal handlers
self.registerSignalHandlers()
return
示例9: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
self.deepcopy = DeepCopier( self )
return
示例10: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
return
示例11: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
base._init(self)
示例12: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
self.initialize()
return
示例13: _init
# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import _init [as 别名]
def _init(self):
Component._init(self)
if self.inventory.dump: self._dump()
return