当前位置: 首页>>代码示例>>Python>>正文


Python Handler.__init__方法代码示例

本文整理汇总了Python中handler.Handler.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Handler.__init__方法的具体用法?Python Handler.__init__怎么用?Python Handler.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在handler.Handler的用法示例。


在下文中一共展示了Handler.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
 def __init__(self, dest=[]):
     Handler.__init__(self, dest=dest)
     self.last_stamp = 0.0
     self.parsers = {}
     self.available_parsers = { "stdtime": self._parse_std_time,
                      "spec1": self._parse_spec1_time,
                      "vsftpd": self._parse_vsftpd_time }
开发者ID:odanielson,项目名称:carmanor,代码行数:9,代码来源:autotimeparser.py

示例2: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
    def __init__(self, config):
        """
        Create a new instance of the ArchiveHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Create Archive Logger
        self.archive = logging.getLogger('autmon')
开发者ID:hellwen,项目名称:autmon,代码行数:11,代码来源:archive.py

示例3: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
    def __init__(self, source_name, filename, dest=[]):
        Handler.__init__(self, dest=dest)
        self.info("Initializing filereader at %s" % (filename))

        self.name = source_name
        self.count = 0
        self.last_report = time.time()

        self.file = open(filename)
        self.read()
        self.report()
开发者ID:odanielson,项目名称:carmanor,代码行数:13,代码来源:filereader.py

示例4: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
    def __init__(self, source_name, path, dest=[]):
        Handler.__init__(self, dest=dest)
        self.childrens = []
        self.name = source_name

        for f in os.listdir(path):
            if os.path.isfile("%s/%s" % (path, f)):
                self.childrens.append(
                    FileReader(f, "%s/%s" % (path, f), dest = dest))
            else:
                self.childrens.append(
                    DirReader(f, "%s/%s" % (path, f), dest))
开发者ID:odanielson,项目名称:carmanor,代码行数:14,代码来源:dirreader.py

示例5: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
	def __init__(self):
		'''Init game.'''
		Handler.__init__(self)
		self.turns = 0
		'''Holds the number of turns that have passed. Ticks up every time 
		Game.input is called.'''
		self.actor = None
		'''Default actor to pass input to.'''
		
		if self.script != None:
			s = self.script.read()
			self.script.close()
			self.script = s
			
		self.scoreList = {}
开发者ID:tomviner,项目名称:text-game,代码行数:17,代码来源:game.py

示例6: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
 def __init__(self,env):
     Handler.__init__(self, env)
     self._ut = Utility()
     self._conf = self._ut._conf
     self._db = self._ut._db
     self._jtheme = self._ut._jtheme
     self._jtheme_mobile = self._ut._jtheme_mobile
     self._jcache = self._ut._jcache
     self._errors = []
     self._messages = []
     self._news = []
     self._page = {}
     self._site = {}
     self._ = self._ut._
     self._site['title'] = self._conf.SITE_TITLE
     self._lang = self._conf.DEFAULT_LANG
     self._template_add = {}
     self._is_mobile = self.get_is_mobile()
开发者ID:nullism,项目名称:RepoCMS,代码行数:20,代码来源:page.py

示例7: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
    def __init__(self, config=None):
        """
        Create a new instance of the MySQLHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Initialize Options
        self.hostname = self.config['hostname']
        self.port = int(self.config['port'])
        self.username = self.config['username']
        self.password = self.config['password']
        self.database = self.config['database']
        self.table = self.config['table']
        self.col_time = self.config['col_time']
        self.col_metric = self.config['col_metric']
        self.col_value = self.config['col_value']

        # Connect
        self._connect()
开发者ID:1and1,项目名称:Diamond,代码行数:22,代码来源:mysql.py

示例8: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
    def __init__(self, config=None):
        """
        Create a new instance of the AutmonHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Initialize Data
        self.socket = None

        # Initialize Options
        self.proto = self.config.get('proto', 'tcp').lower().strip()
        if self.config.get('compress', 'False').strip() == 'True':
            self.compress = True
        else:
            self.compress = False

        try:
            self.host = (self.config['host'][0], int(self.config['host'][1]))
        except Exception, e:
            self.log.error("AutmonHandler: Host parameter is invaild. %s", e)
开发者ID:hellwen,项目名称:autmon,代码行数:23,代码来源:autmon.py

示例9: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
	def __init__(self):
		self.word = self.wordClass()
		self.word.item = self
		Handler.__init__(self)

		cls = self.__class__
		cls.inst = self
		self.game = None
		
		
		self.props = ()
		self.inventory = inventory.Inventory()
		'''list - contains all the items this item owns'''
		
		self.newprops = []
		self.available = cls.available
		
		if cls.owner != None:
			self.owner = None
			self.move(cls.owner)
		else:
			self.owner = None
			
		if cls.location != None:
			self.intMove(cls.location)
		else:
			self.location = None

		props = cls.props
		if props.__class__ != tuple:
			props = (props,)

		for prop in props:
			prop = prop.clone()
			self.addProp(prop)
			
		self.finalizeProps()
		self.dispatchEvent(self.EVT_INIT)
开发者ID:tomviner,项目名称:text-game,代码行数:40,代码来源:items.py

示例10: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
	def __init__(self, bot):
		Handler.__init__(self)
		self.bot = bot
开发者ID:Corgano,项目名称:pyrefly,代码行数:5,代码来源:core.py

示例11: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
	def __init__(self, initChars = ['!']):
		Handler.__init__(self)
		self.commands = {}
		self.overflowHandlers = []
		self.initChars = initChars
开发者ID:Eagull,项目名称:pyrefly,代码行数:7,代码来源:libCommand.py

示例12: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
 def __init__(self, dest=[]):
     Handler.__init__(self, dest=dest)
开发者ID:odanielson,项目名称:carmanor,代码行数:4,代码来源:stdoutprinter.py

示例13: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
 def __init__(self, host='localhost', dest=[]):
     Handler.__init__(self, dest=dest)
     self.es = ElasticSearch('http://%s:9200/' % (host))
     self.source_host = socket.gethostname()
开发者ID:odanielson,项目名称:carmanor,代码行数:6,代码来源:elasticpush.py

示例14: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
 def __init__(self, conn):
     Handler.__init__(self, conn)
开发者ID:prim,项目名称:SZMUD,代码行数:4,代码来源:echo_demo.py

示例15: __init__

# 需要导入模块: from handler import Handler [as 别名]
# 或者: from handler.Handler import __init__ [as 别名]
 def __init__(self, dest=[]):
     Handler.__init__(self, dest=dest)
     self.match = False
开发者ID:odanielson,项目名称:carmanor,代码行数:5,代码来源:erroreventdetector.py


注:本文中的handler.Handler.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。