(storage, indexname=None)
Returns a tuple of (release_version, format_version), where
    release_version is the release version number of the Whoosh code that
    created the index -- e.g. (0, 1, 24) -- and format_version is the version
    number of the on-disk format used for the index -- e.g. -102.

    You should avoid attaching significance to the second number (the index
    version). This is simply a version number for the TOC file and probably
    should not have been exposed in a public interface. The best way to check
    if the current version of Whoosh can open an index is to actually try to
    open it and see if it raises a ``whoosh.index.IndexVersionError`` exception.

    Note that the release and format version are available as attributes on the
    Index object in Index.release and Index.version.

    :param storage: a store.Storage object.
    :param indexname: the name of the index. If None, the default index name is
        used.
    :returns: ((major_ver, minor_ver, build_ver), format_ver)
Returns a tuple of (release_version, format_version), where
    release_version is the release version number of the Whoosh code that
    created the index -- e.g. (0, 1, 24) -- and format_version is the version
    number of the on-disk format used for the index -- e.g. -102.
Returns a tuple of ( release_version format_version ) where release_version is the release version number of the Whoosh code that created the index -- e . g . ( 0 1 24 ) -- and format_version is the version number of the on - disk format used for the index -- e . g . - 102 .
def version(storage, indexname=None):
    """Returns a tuple of (release_version, format_version), where
    release_version is the release version number of the Whoosh code that
    created the index -- e.g. (0, 1, 24) -- and format_version is the version
    number of the on-disk format used for the index -- e.g. -102.

    You should avoid attaching significance to the second number (the index
    version). This is simply a version number for the TOC file and probably
    should not have been exposed in a public interface. The best way to check
    if the current version of Whoosh can open an index is to actually try to
    open it and see if it raises a ``whoosh.index.IndexVersionError`` exception.

    Note that the release and format version are available as attributes on the
    Index object in Index.release and Index.version.

    :param storage: a store.Storage object.
    :param indexname: the name of the index. If None, the default index name is
        used.
    :returns: ((major_ver, minor_ver, build_ver), format_ver)
    """

    try:
        if indexname is None:
            indexname = _DEF_INDEX_NAME

        ix = storage.open_index(indexname)
        return (ix.release, ix.version)
    except IndexVersionError:
        e = sys.exc_info()[1]
        return (None, e.version)
def version ( storage , indexname = None ) : try : if indexname is None : indexname = _DEF_INDEX_NAME ix = storage . open_index ( indexname ) return ( ix . release , ix . version ) except IndexVersionError : e = sys . exc_info ( ) [ 1 ] return ( None , e . version )