@Override
  public @Nullable ExecutionResult execute(@NotNull Executor executor, @NotNull PythonScriptTargetedCommandLineBuilder converter)
    throws ExecutionException {
    Project project = myConfig.getProject();
    if (showCommandLineAfterwards()) {
      if (DefaultRunExecutor.EXECUTOR_ID.equals(executor.getId())) {
        PyRunFileInConsoleAction.configExecuted(myConfig);

        Function<TargetEnvironment, String> runFileText = PythonConsoleScripts.buildScriptFunctionWithConsoleRun(myConfig);
        boolean useExistingConsole = PyConsoleOptions.getInstance(project).isUseExistingConsole();
        PyExecuteInConsole.executeCodeInConsole(project, runFileText, null, useExistingConsole, false, true, myConfig);

        return null;
      }
      else {
        if (DefaultDebugExecutor.EXECUTOR_ID.equals(executor.getId())) {
          PyRunFileInConsoleAction.configExecuted(myConfig);
        }
        return super.execute(executor, converter);
      }
    }
    else if (emulateTerminal()) {
      setRunWithPty(true);

      ProcessHandler processHandler = startProcess(converter);

      TerminalExecutionConsole executeConsole = createTerminalExecutionConsole(project, processHandler);

      processHandler.startNotify();

      return new DefaultExecutionResult(executeConsole, processHandler, AnAction.EMPTY_ARRAY);
    }
    else {
      ExecutionResult executionResult = super.execute(executor, converter);
      if (myConfig.isRedirectInput()) {
        addInputRedirectionMessage(project, executionResult);
      }
      return executionResult;
    }
  }
@Override
  public @Nullable ExecutionResult execute(@NotNull Executor executor, @NotNull PythonScriptTargetedCommandLineBuilder converter)