def _registerPlugins(self):
		# loop over the arguments, looking for some plugins
		for it in self.m_keyArgumentMap.values():
			# try to construct a plugin from that
			tempThreadedPlugin = ThreadedPluginManager(it)
			
			# if valid, we load it and add it to the plugin dictionary
			if(tempThreadedPlugin.hasAValidFormat()):
				try:
					tempThreadedPlugin.loadPlugin()
					self.m_pluginMap[it] = tempThreadedPlugin
				except Exception, e:
					print("\nERROR: " + str(e) + "\n")
    def _registerPlugins(self):
        # loop over the arguments, looking for some plugins
        for it in self.m_keyArgumentMap.values():
            # try to construct a plugin from that
            tempThreadedPlugin = ThreadedPluginManager(it)

            # if valid, we load it and add it to the plugin dictionary
            if (tempThreadedPlugin.hasAValidFormat()):
                try:
                    tempThreadedPlugin.loadPlugin()
                    self.m_pluginMap[it] = tempThreadedPlugin
                except Exception, e:
                    print("\nERROR: " + str(e) + "\n")
and launches it.


"""
import sys
from ThreadedPluginManager import *


# adding the plugin folder to PYTHONPATH
sys.path.append("plugins")


# a string calling a plugin as it is written in a mapping file
pluginString = "plugin|samplePlugin|helloWorld"
pluginString2 = "plugin|samplePlugin|methodWithArguments|9|10"

tpm = ThreadedPluginManager(pluginString2)


if(tpm.hasAValidFormat()):
    print("The format is valid.")

    # if it is valid, we load it
    tpm.loadPlugin()

    # once load, we launch it
    tpm.runPlugin()

else:
    print("The format is NOT valid.")