mirror of
https://github.com/boostorg/litre.git
synced 2026-01-19 04:22:08 +00:00
cplusplus.py, tool.py: bring back litre_config.py file.
cplusplus.py: unicode unhandled example dump workaround index.rst: first example checked in [SVN r34891]
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import os
|
||||
import tempfile
|
||||
import litre
|
||||
import config
|
||||
import re
|
||||
import sys
|
||||
import traceback
|
||||
@@ -674,7 +675,7 @@ use-project /boost : $(BOOST_ROOT) ;
|
||||
def astext(self):
|
||||
return '\n\n ---------------- Unhandled Fragment ------------ \n\n'.join(
|
||||
[''] # generates a leading announcement
|
||||
+ [ str(s) for s in self.stack]
|
||||
+ [ unicode(s) for s in self.stack]
|
||||
)
|
||||
|
||||
class DumpTranslator(CPlusPlusTranslator):
|
||||
|
||||
14
tool.py
14
tool.py
@@ -5,16 +5,24 @@ except:
|
||||
pass
|
||||
|
||||
|
||||
# try to import a litre_config.py file.
|
||||
try:
|
||||
import litre_config as config
|
||||
except:
|
||||
class config: pass
|
||||
|
||||
import sys
|
||||
try: # if the user has set up docutils_root in his config, add it to the PYTHONPATH.
|
||||
sys.path += ['%s/docutils' % config.docutils_root
|
||||
, '%s/docutils/extras' % config.docutils_root]
|
||||
except: pass
|
||||
|
||||
import docutils.writers
|
||||
import cplusplus
|
||||
import os
|
||||
|
||||
from docutils.core import publish_cmdline, default_description
|
||||
|
||||
class config:
|
||||
pass
|
||||
|
||||
description = ('Literate programming from ReStructuredText '
|
||||
'sources. ' + default_description)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user