def load_support_plugin(name):
 stack = list(filter((lambda f: (f[3] == '<module>')), inspect.stack()))
 prev_frame = stack[0]
 path = os.path.dirname(prev_frame[1])
 if (not os.path.isabs(path)):
  prefix = os.path.normpath((__file__ + '../../../../../'))
  path = os.path.join(prefix, path)
 if ((sys.version_info[0] == 3) and (sys.version_info[1] >= 3)):
  import importlib
  loader = importlib.find_loader(name, [path])
  if loader:
   module = loader.load_module()
  else:
   raise ImportError("No module named '{0}'".format(name))
 else:
  import imp
  (fd, filename, desc) = imp.find_module(name, [path])
  try:
   module = imp.load_module(name, fd, filename, desc)
  finally:
   if fd:
    fd.close()
 return module

def load_support_plugin ( name ) : stack = list ( filter ( ( lambda f : ( f [ 3 ] == '<module>' ) ) , inspect . stack ( ) ) ) prev_frame = stack [ 0 ] path = os . path . dirname ( prev_frame [ 1 ] ) if ( not os . path . isabs ( path ) ) : prefix = os . path . normpath ( ( __file__ + '../../../../../' ) ) path = os . path . join ( prefix , path ) if ( ( sys . version_info [ 0 ] == 3 ) and ( sys . version_info [ 1 ] >= 3 ) ) : import importlib loader = importlib . find_loader ( name , [ path ] ) if loader : module = loader . load_module ( ) else : raise ImportError ( "No module named '{0}'" . format ( name ) ) else : import imp ( fd , filename , desc ) = imp . find_module ( name , [ path ] ) try : module = imp . load_module ( name , fd , filename , desc ) finally : if fd : fd . close ( ) return module
loads a plugin from the same directory as the calling plugin .