From b9b093e93d89d909ae2e38a56c44b066e58055f3 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 31 Aug 2002 21:55:24 +0000 Subject: a working pythonpoint translator :) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@619 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- sandbox/richard/pythonpoint/pythonpoint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sandbox/richard/pythonpoint/pythonpoint.py') diff --git a/sandbox/richard/pythonpoint/pythonpoint.py b/sandbox/richard/pythonpoint/pythonpoint.py index ad0f96d1a..3313f0513 100644 --- a/sandbox/richard/pythonpoint/pythonpoint.py +++ b/sandbox/richard/pythonpoint/pythonpoint.py @@ -1,6 +1,6 @@ import cStringIO, cgi, sys, urllib import docutils.utils -from docutils.parsers.restructuredtext import Parser +from docutils.parsers import get_parser_class class DumbPythonPointFormatter: def __init__(self): @@ -330,9 +330,9 @@ class DumbPythonPointFormatter: self.w(cgi.escape(node.data)) def main(filename, debug=0): - parser = Parser() + parser = get_parser_class('rest')() input = open(filename).read() - document = dps.utils.newdocument() + document = docutils.utils.new_document(parser) parser.parse(input, document) if debug == 1: print document.pformat() -- cgit v1.2.1