def parse(self):
"""
Loads the :class:`OptionList` from the associated file, if it exists.
"""
try:
if os.path.isfile(self.filename):
parser = make_parser()
parser.setContentHandler(DocOptionParser(self))
with open(self.filename, encoding="utf-8") as the_file:
parser.parse(the_file)
except (IOError, OSError, SAXParseException):
pass
#------------------------------------------------------------------------
#
# DocOptionParser class
#
#------------------------------------------------------------------------
评论列表
文章目录