A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

19 satır
442 B

  1. # -*- coding: utf-8 -*-
  2. """
  3. Serves the same purpose as mwparserfromhell.compat, but only for objects
  4. required by unit tests. This avoids unnecessary imports (like urllib) within
  5. the main library.
  6. """
  7. from mwparserfromhell.compat import py3k
  8. if py3k:
  9. from io import StringIO
  10. from urllib.parse import urlencode
  11. from urllib.request import urlopen
  12. else:
  13. from StringIO import StringIO
  14. from urllib import urlencode, urlopen