String sendCommandToPython(String cmd){
  String output="";
  LOG.debug("Sending : \n" + (cmd.length() > 200 ? cmd.substring(0,200) + "..." : cmd));
  try {
    output=process.sendAndGetResult(cmd);
  }
 catch (  IOException e) {
    LOG.error("Error when sending commands to python process",e);
  }
  LOG.debug("Got : \n" + output);
  return output;
}

String sendCommandToPython ( String cmd ) { String output = "" ; LOG . debug ( "Sending : \n" + ( cmd . length ( ) > 200 ? cmd . substring ( 0 , 200 ) + "..." : cmd ) ) ; try { output = process . sendAndGetResult ( cmd ) ; } catch ( IOException e ) { LOG . error ( "Error when sending commands to python process" , e ) ; } LOG . debug ( "Got : \n" + output ) ; return output ; }
sends given text to python interpreter , blocks and returns the output
