def load_modules_from_path(path):
 if (path[(-1):] != '/'):
  path += '/'
 if (not os.path.exists(path)):
  raise OSError(('Directory does not exist: %s' % path))
 sys.path.append(path)
 for f in os.listdir(path):
  if ((len(f) > 3) and (f[(-3):] == '.py')):
   modname = f[:(-3)]
   __import__(modname, globals(), locals(), ['*'])

def load_modules_from_path ( path ) : if ( path [ ( - 1 ) : ] != '/' ) : path += '/' if ( not os . path . exists ( path ) ) : raise OSError ( ( 'Directory does not exist: %s' % path ) ) sys . path . append ( path ) for f in os . listdir ( path ) : if ( ( len ( f ) > 3 ) and ( f [ ( - 3 ) : ] == '.py' ) ) : modname = f [ : ( - 3 ) ] __import__ ( modname , globals ( ) , locals ( ) , [ '*' ] )
import all modules from the given directory .