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


Python ContentHandler.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
	def __init__(self):
		ContentHandler.__init__(self)
		self.isItem = False
		self.isTitle = False
		self.isLink = False
		self.tuples = []
		self.ndx = 0
开发者ID:achandu,项目名称:RSSReader,代码行数:9,代码来源:parseRss.py

示例2: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     ContentHandler.__init__(self)
     self.__level = -1
     self.__main_menus = []
     self.__parent_menus = []
     self.__actions_specs = []
     self.__menuItem = None
开发者ID:TEAM-HRA,项目名称:hra_suite,代码行数:9,代码来源:menu_parser.py

示例3: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     ContentHandler.__init__(self)  # can't use super() here !?
     self.modelVariables = []
     self.ruleConstants = []
     self.moleculeConstants = []
     self.rewardConstants = []
     self.switch1 = ""
     self.switch2 = ""
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:10,代码来源:model_parameters.py

示例4: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     ContentHandler.__init__(self)
     self.__inItem = False
     self.__inTitle = False
     self.__inIssued = False
     self.title = ""
     self.issued = ""
     self.entries = []
开发者ID:cjastram,项目名称:silverbot,代码行数:10,代码来源:order-tracker.py

示例5: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     """
    @param override: erase existing database?
    """
     ContentHandler.__init__(self)
     self.tag = "row"
     self.answer_type = "2"
     self.question_type = "1"
     self.on_post = []
开发者ID:liukai,项目名称:Stack-Resys,代码行数:11,代码来源:post_handler.py

示例6: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     ContentHandler.__init__(self)
     self.chars = u""
     self.currentTag = None
     self.rootObject = None
     self.objectPath = []
     self.styles = {}
     self.schemas = {}
     self.resources = set()
开发者ID:paleolimbot,项目名称:pyny-geo,代码行数:11,代码来源:kml.py

示例7: CasperMobileDeviceListHandler

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
# This class is used to parse the /mobiledevices list to get all of the ids and usernames
class CasperMobileDeviceListHandler(ContentHandler):
	def __init__(self, grabber, deviceMap, unmanagedDeviceMap):
		ContentHandler.__init__(self)
		self.grabber = grabber
		self.deviceMap = deviceMap
		self.unmanagedDeviceMap = unmanagedDeviceMap
		self.currentID = ""
		self.inID = False
开发者ID:rderewianko,项目名称:API_Scripts,代码行数:11,代码来源:mdGroupEnroll.py

示例8: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
    def __init__(self, handler):
        ContentHandler.__init__(self)

        # get a logger
        self.__logger = logging.getLogger("chattest.common.MessageParser")
        self.__logger.debug("Created a new MessageParser object...")

        # init member variables
        self.__handler = handler
        self.__state = []
        self.__message = ""
开发者ID:Luminoth,项目名称:chattest,代码行数:13,代码来源:MessageParser.py

示例9: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     ContentHandler.__init__(self)
     self.current_track = None   # holds data for the current track
     self.parsed = {}      # holds all tracks
     self.content = ""     # accumulator for character data
     self.numeric = re.compile('\d+\.?\d*$')   
     self.float_required = ['file_size', 'duration', 'overall_bit_rate', 'stream_size', 
                            'ID',  'file_size', 'bit_rate', 'width', 'height', 
                            'frame_rate', 'resolution', 'bit_depth', 'delay',]
     # duration is in milliseconds, we want seconds
     self.conversions = { 'duration': lambda x: str(float(x)/1000.) }  
开发者ID:relic7,项目名称:nd1404,代码行数:13,代码来源:extract_basic.py

示例10: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
    def __init__(self, parameters_dictionary, parameter_set_name):
        self.parameters_dictionary = parameters_dictionary

#        self.expected_parameters_name = parameters_name
#        self.has_expected_parameters_name = False

        self.expected_parameter_set_name = parameter_set_name
        self.has_expected_parameter_set_name = False
        
#        super(ParamsXMLReader, self).__init__() # doesn't work! Use below instead.
        ContentHandler.__init__(self)
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:13,代码来源:params.py

示例11: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self, env={}):
   ContentHandler.__init__(self)
   # output file
   self.out = StringIO()
   # stack of (action, environment, release tag) for each current context
   self.stack = [('', env, '')]
   # stack of (id, tag) for each tag. Used to match tags on self.stack
   self.tag_stack = []
   # flag when we are in a singleton tag
   # used by self.showStartElement(), self.showEndElement
   self.singleton = False
开发者ID:mrcjhurst,项目名称:evoke,代码行数:13,代码来源:saxrender.py

示例12: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
    def __init__(self, content):
        ContentHandler.__init__(self)

        self.content = False
        self.tree = []
        self.stack = []
        self.stack_usage = []

        self.strong = False
        self.emphasis = False

        saxify(content, self)
开发者ID:dmzkrsk,项目名称:feed-fb2,代码行数:14,代码来源:html2fb2.py

示例13: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self):
     ContentHandler.__init__(self)
     self.rootAttributes = None
     self.__parser = make_parser()
     # Init the parser's handlers
     self.restoreParser()
     # No container at this time
     self.__container = None
     # Reset all the containers, to make sure previous runs don't leave
     # garbage data
     for container in self.container_dispatch.values():
         container.reset()
开发者ID:bjmingyang,项目名称:spacewalk,代码行数:14,代码来源:xmlSource.py

示例14: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
	def __init__(self):
		ContentHandler.__init__(self)
		
		self.map = Map()
		
		self.dataBuffer = ''
		self.dataEncoding = ''
		
		self.inMap = False
		self.inTileset = False
		self.inLayer = False
		self.inData = False
		self.inProperties = False
开发者ID:bombpersons,项目名称:RPGlibs,代码行数:15,代码来源:map.py

示例15: __init__

# 需要导入模块: from xml.sax import ContentHandler [as 别名]
# 或者: from xml.sax.ContentHandler import __init__ [as 别名]
 def __init__(self, delegate):
     ContentHandler.__init__(self)
     self.currentTag = ''
     self.currentChannel = ''
     self.event = ''
     self.horizontalUnit = ''
     self.verticalUnit = ''
     self.eventTime = ''
     self.chanData = {}
     self.chanData['CHN1'] = {}
     self.chanData['CHN2'] = {}
     self.chanData['CHN3'] = {}
     self.chanData['CHN4'] = {}
     self.numEvents = 0
     self.delegate = delegate
开发者ID:Deshpande81,项目名称:drs4,代码行数:17,代码来源:drs4Event.py


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