sys.path.insert(0, pluginsDir)
lst = map(lambda x: os.path.splitext(os.path.basename(x))[0], glob.glob(os.
    path.join(pluginsDir, '*.py')))
How to provide an API to extend a Python program with plugins?