private boolean pythonErrorIn(String output){
  boolean isError=false;
  String[] outputMultiline=output.split("\n");
  Matcher errorMatcher;
  for (  String row : outputMultiline) {
    errorMatcher=errorInLastLine.matcher(row);
    if (errorMatcher.find() == true) {
      isError=true;
      break;
    }
  }
  return isError;
}

private boolean pythonErrorIn ( String output ) { boolean isError = false ; String [ ] outputMultiline = output . split ( "\n" ) ; Matcher errorMatcher ; for ( String row : outputMultiline ) { errorMatcher = errorInLastLine . matcher ( row ) ; if ( errorMatcher . find ( ) == true ) { isError = true ; break ; } } return isError ; }
checks if there is a syntax error or an exception
