A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

26 行
432 B

  1. # -*- coding: utf-8 -*-
  2. """
  3. Implements support for both Python 2 and Python 3.
  4. """
  5. import sys
  6. py3k = sys.version_info.major == 3
  7. if py3k:
  8. bytes = bytes
  9. str = str
  10. basestring = str
  11. maxsize = sys.maxsize
  12. import html.entities as htmlentities
  13. else:
  14. bytes = str
  15. str = unicode
  16. basestring = basestring
  17. maxsize = sys.maxint
  18. import htmlentitydefs as htmlentities
  19. del sys