Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v1.10
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 18 lines (16 sloc) 0.456 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# magicmarkdown.py
# utility script for changing markdown from magic methods guide into HTML

import markdown

mkd = open('magicmethods.mkd', 'r')
text = mkd.read()
mkd.close()
mkd2 = open('appendix.mkd', 'r')
text2 = mkd2.read()
mkd2.close()
html = markdown.markdown(text,
                         ['def_list', 'codehilite'])
appendix = markdown.markdown(text2, ['tables'])
out = open('markedup.html', 'w')
out.write(html)
out.write(appendix)
out.close()
Something went wrong with that request. Please try again.