From: Magnus L. <ma...@th...> - 2003-03-18 01:45:21
|
At 02:23 2003-03-18 +0100, Magnus Lycka wrote: >I'm trying to use the pythonpoint thingie in the sandbox, >but it seems parse() in parsers/rst/__init__() assumes that >documents have a .tab_with attribute which isn't there... Sorry, that should have been "document.settings.tab_width" in parsers/rst/__init__.py. And yes, I should go to sleep now... The document is created with "docutils.utils.new_document(parser)" which means (I think) that document.settings = frontend.OptionParser().get_default_values() Print document.settings show: docutils.optik.Values({'_destination': None, 'output_encoding': 'utf-8', 'footnote_backlinks': 1, 'halt_level': 4, 'dump_pseudo_xml': None, 'generator': None, '_source': None, 'language_code': 'en', 'source_link': None, 'input_encoding': None, 'expose_internals': None, 'source_url': None, 'dump_transforms': None, 'toc_backlinks': 'entry', 'datestamp': None, 'warning_stream': None, 'dump_internals': None, 'debug': None, 'report_level': 2, 'dump_settings': None}) The only other place than this part of rst/__init__.py where I find tab_width is as a local variable in statemachine.string2lines... Hm... >Anyone know what this is all about? > >...\sandbox\richard\pythonpoint>pythonpoint.py example_slides.txt > >Traceback (most recent call last): > File "...\sandbox\richard\pythonpoint\pythonpoint.py", line 347, in ? > main(sys.argv[1]) > File "...\sandbox\richard\pythonpoint\pythonpoint.py", line 336, in main > parser.parse(input, document) > File "...\site-packages\docutils\parsers\rst\__init__.py", line 116, in > parse > inputlines = docutils.statemachine.string2lines( >AttributeError: Values instance has no attribute 'tab_width' > >I'm using the CVS trunk and ActivePython 2.2 on Win2k. -- Magnus Lycka, Thinkware AB Alvans vag 99, SE-907 50 UMEA, SWEDEN phone: int+46 70 582 80 65, fax: int+46 70 612 80 65 http://www.thinkware.se/ mailto:ma...@th... |