#NEWLINE# def get_version( verbose = False , line_only = False ) : #NEWLINE# #INDENT# "\n    Return a version string for this package, based on `VERSION`.\n\n    When ``verbose`` is False (the default), `get_version` prints a\n    tag-friendly version of the string, e.g. '0.9a2'.\n\n    When ``verbose`` is True, a slightly more human-readable version is\n    produced, e.g. '0.9 alpha 2'.\n\n    When ``line_only`` is True, only the major and minor version numbers are\n    returned, e.g. '0.9'.\n\n    This code is based off of Django's similar version output algorithm.\n    " #NEWLINE# version = ( '%s.%s' % ( VERSION [ 0 ] , VERSION [ 1 ] ) ) #NEWLINE# if line_only : #NEWLINE# #INDENT# return version #NEWLINE# #UNINDENT# if VERSION [ 2 ] : #NEWLINE# #INDENT# version = ( '%s.%s' % ( version , VERSION [ 2 ] ) ) #NEWLINE# #UNINDENT# if ( VERSION [ 3 ] != 'final' ) : #NEWLINE# #INDENT# if ( not verbose ) : #NEWLINE# #INDENT# version = ( '%s%s%s' % ( verbose , VERSION [ 3 ] [ 0 ] , VERSION [ 4 ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# version = ( '%s %s %s' % ( version , VERSION [ 3 ] , VERSION [ 4 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if verbose : #NEWLINE# #INDENT# version = ( '%s %s' % ( version , VERSION [ 3 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# return version