Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

MediaWiki-compatible parser for Python.

Project Description

A mediawiki-compatible parser for Python.

Current status:


To run the tests:

$ make -C tests

The test result can be found in tests/out/report.html.

A command line tool is available, too (installed as “mw”):

$ echo "''Hello World''" | python smc/mw/
<html><body><p><i>Hello World</i>


For specific differences, see the test results.

  • __TOC__ and other magic words must appear on a line on their own, while MediaWiki allows them everyhwere with some strange consequences.


  • Test 843: Section extraction, <pre> around bogus header (bug 10309) This should be fixed, as it affects parser extensions (math element, etc), too. For this, the preprocessor grammar needs to include specific (but not all) XML elements parsed (counterexample: div elements are transparent for headings, pre elements are not).


The parser uses the grako parser generator for PEG grammars by ResQSoft Inc. and Juancarlo Añez.


Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (777.4 kB) Copy SHA256 Checksum SHA256 Source Nov 22, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting