0

I found myself searching for the version of docutils the server was running. To my surprise, it wasn't as straight forward as typing whatever command with flag "--version". I finally got it through the commands below, but isn't it something more direct than that?

# Assuming we are on Debian like distribution
aptitude show python-docutils

# If "docutils" is managed by pip
pip freeze | grep docutils
Fabien
  • 787
  • 1
  • 6
  • 11

1 Answers1

1

The Docutils package (like many other Python packages) exposes a version number through the parameter __version__ (search for this in /path/to/docutils/__init__.py for the definition/documentation). A simple one liner to display this is:

python -c "import docutils; print docutils.__version__"

Edit: Having just tried python rst2html.py --version I get the following information printed to screen

rst2html.py (Docutils 0.9.1 [release], Python 2.6.8, on linux2)

is this what you are after?

Chris
  • 44,602
  • 16
  • 137
  • 156