
import os
import fnmatch
import re
import subprocess
import sys
import json
import imp
import time

class pipeline(object):
    def __init__(self):
        self.name = ''
        self.taskId = ''
        self.taskPath = ''
        self.scriptPath = ''
        self.inputPath = ''
        self.outputPath = ''
        self.setting = ''

    def logger(self, message):
        print("["+time.strftime('%Y-%m-%d %H:%M%p %Z')+"] "+message)

    def read_config(self):
        with open("app.json") as json_file:
            self.setting = json.load(json_file)

    def clean(self):
        self.read_config()
        self.logger("Start pipeline")

    def processApp(self):
        self.logger("processApp")

    def pj_initialize(self):
        self.logger("initialize")

    def run(self):
        for step in self.setting['step']:
            mod = imp.load_source(step["packageName"], './')
            if hasattr(mod, step["className"]):
                class_inst = getattr(mod, step["className"])()
                class_inst.setName(step['name'])
                class_inst.init()
                class_inst.run()
                class_inst.finish()

@@ -92,16 +92,42 @@
 ort time
+%0Afrom pprint import pprint
 %0A%0Aclass 
@@ -872,23 +872,18 @@
 d = 
+__
 imp
-.load_source
+ort__
 (ste
@@ -902,14 +902,8 @@
 me%22%5D
-, './'
 )%0A  

Change the way to import package dynamically