def get_pylint_version():
 if (PYLINT_PATH is None):
  return
 cwd = osp.dirname(PYLINT_PATH)
 args = ['--version']
 if (os.name == 'nt'):
  cmd = ' '.join(([PYLINT] + args))
  process = programs.run_shell_command(cmd, cwd=cwd)
 else:
  process = programs.run_program(PYLINT, args, cwd=cwd)
 lines = to_unicode_from_fs(process.stdout.read()).splitlines()
 if lines:
  regex = '({0}*|pylint-script.py) ([0-9\\.]*)'.format(PYLINT)
  match = re.match(regex, lines[0])
  if (match is not None):
   return match.groups()[1]

def get_pylint_version ( ) : if ( PYLINT_PATH is None ) : return cwd = osp . dirname ( PYLINT_PATH ) args = [ '--version' ] if ( os . name == 'nt' ) : cmd = ' ' . join ( ( [ PYLINT ] + args ) ) process = programs . run_shell_command ( cmd , cwd = cwd ) else : process = programs . run_program ( PYLINT , args , cwd = cwd ) lines = to_unicode_from_fs ( process . stdout . read ( ) ) . splitlines ( ) if lines : regex = '({0}*|pylint-script.py) ([0-9\\.]*)' . format ( PYLINT ) match = re . match ( regex , lines [ 0 ] ) if ( match is not None ) : return match . groups ( ) [ 1 ]
return pylint version .