'import self.pyfile as python module'

def importPyModule(self):

    self.pyModule = None
    try:
        sys.path.append(PY_MODULE_PATH)
    except NameError:
        pass
    (pyPath, filename) = os.path.split(self.pyfile)
    pypos = filename.strip().rfind('.py')
    if (pypos < 0):
        print 'pypypypypypypypy'
    else:
        filename = filename[:pypos]
    sys.path.append(pyPath)
    self.pyModule = __import__(filename)
    sys.path.pop((-1))
    sys.path.pop((-1))
