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