aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-07-06 13:46:50 -0400
committerWaylan Limberg <waylan@gmail.com>2010-07-06 13:46:50 -0400
commit543027d73f2d9bf66fc8b56c18acfd1c987b1a8d (patch)
tree1b20bb3051cd076d2f0f14ec5ca844cf41c5bbff
parent2c19f4e047b70a17d74e976b0cfd35b5c0340a33 (diff)
downloadmarkdown-543027d73f2d9bf66fc8b56c18acfd1c987b1a8d.tar.gz
markdown-543027d73f2d9bf66fc8b56c18acfd1c987b1a8d.tar.bz2
markdown-543027d73f2d9bf66fc8b56c18acfd1c987b1a8d.zip
Updated commandline script as logging settings are no longer in markdown/__init__.py
-rwxr-xr-xbin/markdown_py3
-rw-r--r--markdown/commandline.py3
-rw-r--r--markdown/util.py3
3 files changed, 5 insertions, 4 deletions
diff --git a/bin/markdown_py b/bin/markdown_py
index 8d04cc9..b34cb66 100755
--- a/bin/markdown_py
+++ b/bin/markdown_py
@@ -30,12 +30,11 @@ License: BSD (see docs/LICENSE for details).
"""
import logging
-from markdown import COMMAND_LINE_LOGGING_LEVEL
from markdown import commandline
# Setup a logger manually for compatibility with Python 2.3
logger = logging.getLogger('MARKDOWN')
-logger.setLevel(COMMAND_LINE_LOGGING_LEVEL)
+logger.setLevel(commandline.COMMAND_LINE_LOGGING_LEVEL)
logger.addHandler(logging.StreamHandler())
if __name__ == '__main__':
diff --git a/markdown/commandline.py b/markdown/commandline.py
index dce2b8a..049d2be 100644
--- a/markdown/commandline.py
+++ b/markdown/commandline.py
@@ -10,6 +10,9 @@ import optparse
import logging
from logging import DEBUG, INFO, WARN, ERROR, CRITICAL
+# default logging level for command-line use
+COMMAND_LINE_LOGGING_LEVEL = CRITICAL
+
def parse_options():
"""
Define and parse `optparse` options for command-line usage.
diff --git a/markdown/util.py b/markdown/util.py
index 4890b89..c170368 100644
--- a/markdown/util.py
+++ b/markdown/util.py
@@ -15,8 +15,7 @@ Constants you might want to modify
-----------------------------------------------------------------------------
"""
-# default logging level for command-line use
-COMMAND_LINE_LOGGING_LEVEL = CRITICAL
+
TAB_LENGTH = 4 # expand tabs to this many spaces
ENABLE_ATTRIBUTES = True # @id = xyz -> <... id="xyz">
SMART_EMPHASIS = True # this_or_that does not become this<i>or</i>that