A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

19 lignes
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