00013 :
00014 """
00015 _getScenario_
00016
00017 Util to load the scenario implementation.
00018
00019 Assumes that module exists at:
00020
00021 Configuration.DataProcessing.Impl.<scenarioName>.py
00022
00023 """
00024 moduleName = "Configuration.DataProcessing.Impl.%s" % scenarioName
00025 try:
00026 module = __import__(moduleName,
00027 globals(), locals(), [scenarioName])
00028 except ImportError, ex:
00029 msg = "Unable to load Scenario Module:\n"
00030 msg += "%s\n%s\n" % (moduleName, str(ex))
00031 raise RuntimeError, msg
00032 instance = getattr(module, scenarioName, None)
00033 if instance == None:
00034 msg = "Unable to retrieve instance of Scenario class:"
00035 msg += "%s\n From Module\n%s" % (scenarioName, moduleName)
00036 return instance()
00037
00038