本文整理汇总了Python中difflib.Differ.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Differ.__init__方法的具体用法?Python Differ.__init__怎么用?Python Differ.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类difflib.Differ
的用法示例。
在下文中一共展示了Differ.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from difflib import Differ [as 别名]
# 或者: from difflib.Differ import __init__ [as 别名]
def __init__(self, result1=[''], result2=[''], junk = "\n"):
self.result1 = result1
self.result2 = result2
self.junk = junk
self.umit_top_banner = ['|'+'-'*70+'|\n',
'|'+_('Umit - Take the red pill').center (70)+'|\n',
'|'+_('http://www.umitproject.org').center(70)+'|\n',
'|'+' '*70+'|\n',
'|'+_('This diff was generated by Umit').center(70)+'|\n',
'|'+_("(Changes to this file can make Umit unable to read \
it.)").center(70)+'|\n',
'|'+'-'*70+'|\n',
'\n',
'-'*10+_(' Start of diff ')+'-'*10+'\n']
self.end_diff = ['\n'+'-'*10+_(' End of diff ')+'-'*10+'\n']
Differ.__init__ (self, self.line_junk)