def is_compat(major_ver=1):
 import openpyxl
 ver = LooseVersion(openpyxl.__version__)
 if (major_ver == 1):
  return (LooseVersion(start_ver) <= ver < LooseVersion(stop_ver))
 elif (major_ver == 2):
  return (LooseVersion(stop_ver) <= ver)
 else:
  raise ValueError('cannot test for openpyxl compatibility with ver {0}'.format(major_ver))

def is_compat ( major_ver = 1 ) : import openpyxl ver = LooseVersion ( openpyxl . __version__ ) if ( major_ver == 1 ) : return ( LooseVersion ( start_ver ) <= ver < LooseVersion ( stop_ver ) ) elif ( major_ver == 2 ) : return ( LooseVersion ( stop_ver ) <= ver ) else : raise ValueError ( 'cannot test for openpyxl compatibility with ver {0}' . format ( major_ver ) )
detect whether the installed version of openpyxl is supported parameters ver : int 1 requests compatibility status among the 1 .