Skip to content

Commit ba35973

Browse files
committed
Add get_libtmux_version
1 parent aa363c6 commit ba35973

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

libtmux/common.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,3 +668,16 @@ def handle_option_error(error):
668668
raise exc.AmbiguousOption(error)
669669
else:
670670
raise exc.OptionError(error) # Raise generic option error
671+
672+
673+
def get_libtmux_version():
674+
"""Return libtmux version is a PEP386 compliant format.
675+
676+
Returns
677+
-------
678+
distutils.version.LooseVersion
679+
libtmux version
680+
"""
681+
from libtmux.__about__ import __version__
682+
683+
return LooseVersion(__version__)

0 commit comments

Comments
 (0)