diff options
-rw-r--r-- | markdown/commandline.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/markdown/commandline.py b/markdown/commandline.py index 1eedc6d..78dfc5a 100644 --- a/markdown/commandline.py +++ b/markdown/commandline.py @@ -11,7 +11,7 @@ import sys import logging from logging import DEBUG, INFO, WARN, ERROR, CRITICAL -EXECUTABLE_NAME_FOR_USAGE = "python markdown.py" +EXECUTABLE_NAME_FOR_USAGE = "python markdown" """ The name used in the usage statement displayed for python versions < 2.3. (With python 2.3 and higher the usage statement is generated by optparse and uses the actual name of the executable called.) """ @@ -42,7 +42,8 @@ def parse_options(): print OPTPARSE_WARNING return None, None - parser = optparse.OptionParser(usage="%prog INPUTFILE [options]") + parser = optparse.OptionParser(usage="%prog INPUTFILE [options]", + version="%%prog %s" % markdown.version) parser.add_option("-f", "--file", dest="filename", default=sys.stdout, help="write output to OUTPUT_FILE", metavar="OUTPUT_FILE") |