markdown wikidiscuss the markdown format Python wrapper around the official Markdown.pl scriptYou will have to download the official Markdown.pl and keep it in the same dir as this script.
This script is in the public domain """ import sys import getopt import os help_message = ''' This is just a wrapper around Markdown.pl feed it any arguments you would to the perl version ''' class Usage(Exception): def __init__(self, msg): self.msg = msg def main(argv=None): if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "ho:v", ["help"]) except getopt.error, msg: raise Usage(msg)
def markdown(text) : (child_stdin, child_stdout_stderr) = os.popen4('./Markdown.pl') child_stdin.write(text) child_stdin.close() return child_stdout_stderr.read() if __name__ == "__main__": sys.exit(main()) Prom dress Prom gown Oil paintings |
Internal linksExternal Links |