def updatePyExec(bindir, executable=None):
 bindir = os.path.realpath(bindir)
 if (executable is None):
  executable = sys.executable
 pypath = os.path.join(bindir, 'fail2ban-python')
 isfile = os.path.isfile(os.path.realpath(pypath))
 if ((not isfile) or (os.path.realpath(pypath) != os.path.realpath(executable))):
  if isfile:
   os.unlink(pypath)
  os.symlink(executable, pypath)
 if (bindir not in os.environ['PATH'].split(os.pathsep)):
  os.environ['PATH'] = ((os.environ['PATH'] + os.pathsep) + bindir)

def updatePyExec ( bindir , executable = None ) : bindir = os . path . realpath ( bindir ) if ( executable is None ) : executable = sys . executable pypath = os . path . join ( bindir , 'fail2ban-python' ) isfile = os . path . isfile ( os . path . realpath ( pypath ) ) if ( ( not isfile ) or ( os . path . realpath ( pypath ) != os . path . realpath ( executable ) ) ) : if isfile : os . unlink ( pypath ) os . symlink ( executable , pypath ) if ( bindir not in os . environ [ 'PATH' ] . split ( os . pathsep ) ) : os . environ [ 'PATH' ] = ( ( os . environ [ 'PATH' ] + os . pathsep ) + bindir )
update fail2ban-python link to current python version .