Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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