예제 #1
0
    def start( self ):
        " Starts the remote process "
        params = GlobalData().getRunParameters( self.__path )
        if self.__needRedirection:
            workingDir, cmd, \
            environment = getCwdCmdEnv( CMD_TYPE_RUN, self.__path, params,
                                        Settings().terminalType,
                                        None, self.__serverPort, self.__procID )
        else:
            workingDir, cmd, \
            environment = getCwdCmdEnv( CMD_TYPE_RUN, self.__path, params,
                                        Settings().terminalType )

        try:
            self.__proc = Popen( cmd, shell = True,
                                 cwd = workingDir, env = environment )
        except Exception, exc:
            logging.error( str( exc ) )
            return False
예제 #2
0
    def start(self):
        " Starts the remote process "
        params = GlobalData().getRunParameters(self.__path)
        if self.__needRedirection:
            workingDir, cmd, \
            environment = getCwdCmdEnv( CMD_TYPE_RUN, self.__path, params,
                                        Settings().terminalType,
                                        None, self.__serverPort, self.__procID )
        else:
            workingDir, cmd, \
            environment = getCwdCmdEnv( CMD_TYPE_RUN, self.__path, params,
                                        Settings().terminalType )

        try:
            self.__proc = Popen(cmd,
                                shell=True,
                                cwd=workingDir,
                                env=environment)
        except Exception, exc:
            logging.error(str(exc))
            return False
예제 #3
0
    def __process(self):
        " Runs profiling session and waits till it ends, fails or is cancelled "

        self.__inProgress = True
        QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))

        sock, port = createDoneFeedbackSocket()

        params = GlobalData().getRunParameters(self.__scriptName)
        workingDir, cmd, environment = getCwdCmdEnv(CMD_TYPE_PROFILE,
                                                    self.__scriptName, params,
                                                    Settings().terminalType,
                                                    port)
        try:
            # profProc =
            Popen(cmd, shell=True, cwd=workingDir, env=environment)
        except Exception, exc:
            self.__onError(str(exc))
            return
예제 #4
0
    def __process( self ):
        " Runs profiling session and waits till it ends, fails or is cancelled "

        self.__inProgress = True
        QApplication.setOverrideCursor( QCursor( Qt.WaitCursor ) )

        sock, port = createDoneFeedbackSocket()

        params = GlobalData().getRunParameters( self.__scriptName )
        workingDir, cmd, environment = getCwdCmdEnv( CMD_TYPE_PROFILE,
                                                     self.__scriptName, params,
                                                     Settings().terminalType,
                                                     port )
        try:
            # profProc =
            Popen( cmd, shell = True,
                              cwd = workingDir, env = environment )
        except Exception, exc:
            self.__onError( str( exc ) )
            return