From: Georg Brandl Date: Sun, 2 Mar 2008 06:44:08 +0000 (+0000) Subject: Make patchlevel print out the release if called as a script. X-Git-Tag: v2.6a2~434 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0177282199d4b19108210a357f726a26c05afe1;p=thirdparty%2FPython%2Fcpython.git Make patchlevel print out the release if called as a script. --- diff --git a/Doc/tools/sphinxext/patchlevel.py b/Doc/tools/sphinxext/patchlevel.py index 971ea6197f6b..cb9e35c2267b 100644 --- a/Doc/tools/sphinxext/patchlevel.py +++ b/Doc/tools/sphinxext/patchlevel.py @@ -66,3 +66,6 @@ def get_version_info(): print >>sys.stderr, 'Can\'t get version info from Include/patchlevel.h, ' \ 'using version of this interpreter (%s).' % release return version, release + +if __name__ == '__main__': + print get_header_version_info('.')[1]