def search_for_check_esx3():
 me = os.path.abspath(__file__)
 my_dir = os.path.dirname(me)
 possible_paths = [os.path.join(my_dir, 'check_esx3.pl'), '/var/lib/nagios/check_esx3.pl', '/var/lib/plugins/nagios/check_esx3.pl', '/var/lib/shinken/check_esx3.pl', '/usr/local/nagios/libexec/check_esx3.pl', '/usr/local/shinken/libexec/check_esx3.pl', 'c:\\shinken\\libexec\\check_esx3.pl']
 for p in possible_paths:
  print 'Look for', p
  if os.path.exists(p):
   print 'Found a check_esx3.pl at', p
   return p
 return None

def search_for_check_esx3 ( ) : me = os . path . abspath ( __file__ ) my_dir = os . path . dirname ( me ) possible_paths = [ os . path . join ( my_dir , 'check_esx3.pl' ) , '/var/lib/nagios/check_esx3.pl' , '/var/lib/plugins/nagios/check_esx3.pl' , '/var/lib/shinken/check_esx3.pl' , '/usr/local/nagios/libexec/check_esx3.pl' , '/usr/local/shinken/libexec/check_esx3.pl' , 'c:\\shinken\\libexec\\check_esx3.pl' ] for p in possible_paths : print 'Look for' , p if os . path . exists ( p ) : print 'Found a check_esx3.pl at' , p return p return None
search for the check_esx3 .