예제 #1
0
    def __init__(self):
        QObject.__init__(self)
        self.__kId = uuid.uuid1()

        self.__eddSettings = ESettings()
        sys.path.append(ESettings.EDD_PLUGIN_PATH)

        self.__availableNodes = [pluginFileName.strip('.py') for pluginFileName in EFileUtils.getFiles(ESettings.EDD_PLUGIN_PATH, '.py', False)]

        self.__registeredNodes = {}

        self.__genericInput = None
        self.__genericOutput = None
예제 #2
0
    def keyPressEvent(self, keyEvent):

        QPlainTextEdit.keyPressEvent(self, keyEvent)

        if keyEvent.key() == Qt.Key_Control:
            self.__IsControl = True

        if keyEvent.key() == Qt.Key_Return and self.__IsControl:

            f = open(os.path.join(ESettings.EDD_PLUGIN_TEMP, "temp.py"), 'w')

            f.write(self.toPlainText())
            f.close()

            sys.path.append(ESettings.EDD_PLUGIN_TEMP)

            nodes = [pluginFileName.replace('.py', '') for pluginFileName in EFileUtils.getFiles(ESettings.EDD_PLUGIN_PATH, '.py', False)]

            pluginModule = __import__('temp', globals(), locals(), [])

            print self.parentWidget()

            print pluginModule