Пример #1
0
 def __post_execution(self):
     """Execute a script after executing the project."""
     filePostExec = QFile(self.postExec)
     if filePostExec.exists() and bool(QFile.ExeUser & filePostExec.permissions()):
         ext = file_manager.get_file_extension(self.postExec)
         if not self.pythonPath:
             self.pythonPath = settings.PYTHON_PATH
         self.currentProcess = self._postExecScriptProc
         if ext == "py":
             self._postExecScriptProc.start(self.pythonPath, [self.postExec])
         else:
             self._postExecScriptProc.start(self.postExec)
Пример #2
0
 def __post_execution(self):
     """Execute a script after executing the project."""
     filePostExec = QFile(self.postExec)
     if filePostExec.exists() and \
       bool(QFile.ExeUser & filePostExec.permissions()):
         ext = file_manager.get_file_extension(self.postExec)
         if not self.pythonPath:
             self.pythonPath = settings.PYTHON_PATH
         self.currentProcess = self._postExecScriptProc
         if ext == 'py':
             self._postExecScriptProc.start(self.pythonPath,
                 [self.postExec])
         else:
             self._postExecScriptProc.start(self.postExec)
Пример #3
0
 def __pre_execution(self):
     """Execute a script before executing the project."""
     filePreExec = QFile(self.preExec)
     if filePreExec.exists() and \
       bool(QFile.ExeUser & filePreExec.permissions()):
         ext = file_manager.get_file_extension(self.preExec)
         if not self.pythonPath:
             self.pythonPath = settings.PYTHON_PATH
         self.currentProcess = self._preExecScriptProc
         self.__preScriptExecuted = True
         if ext == 'py':
             self._preExecScriptProc.start(self.pythonPath, [self.preExec])
         else:
             self._preExecScriptProc.start(self.preExec)
     else:
         self.__main_execution()
Пример #4
0
 def __pre_execution(self):
     """Execute a script before executing the project."""
     filePreExec = QFile(self.preExec)
     if filePreExec.exists() and \
             bool(QFile.ExeUser & filePreExec.permissions()):
         ext = file_manager.get_file_extension(self.preExec)
         if not self.pythonExec:
             self.pythonExec = settings.PYTHON_PATH
         self.currentProcess = self._preExecScriptProc
         self.__preScriptExecuted = True
         if ext == 'py':
             self._preExecScriptProc.start(self.pythonExec, [self.preExec])
         else:
             self._preExecScriptProc.start(self.preExec)
     else:
         self.__main_execution()