dkuhlman  committed 3653367

Fix to config file access and added note on config in documentation

  • Participants
  • Parent commits dc70ba7
  • Branches default

Comments (0)

Files changed (2)

File docutils/docs/user/odt.txt

     $ --source-url=odtwriter.txt --generator --stylesheet=/myconfigs/styles.odt odtwriter.txt odtwriter.odt
+Configuration file
+The options described below can also be set in a configuration file.
+Use section ``[odf_odt writer]`` to set options specific to the
+``odtwriter``.  For example::
+    [odf_odt writer]
+    stylesheet: styles1.odt
+See the "Docutils Configuration" document for more information on
+Docutils configuration files, including locations which are
 Command line options

File docutils/docutils/writers/odf_odt/

 import time
 import re
 import StringIO
-import inspect
-import imp
 import copy
 import urllib2
 import docutils
 from docutils import frontend, nodes, utils, writers, languages
-from docutils.parsers import rst
 from docutils.readers import standalone
 from docutils.transforms import references
 except ImportError, exp:
     pygments = None
-try: # check for the Python Imaging Library
+# check for the Python Imaging Library
     import PIL.Image
 except ImportError:
     try:  # sometimes PIL modules are put in PYTHONPATH's root
     'oooc': '',
     'ooow': '',
     'presentation': 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0',
     'script': 'urn:oasis:names:tc:opendocument:xmlns:script:1.0',
     'style': 'urn:oasis:names:tc:opendocument:xmlns:style:1.0',
     'svg': 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0',
-    config_section = 'opendocument odf writer'
+    config_section = 'odf_odt writer'
     config_section_dependencies = (