title: BufferedReader pauses on .readLine() when using ProcessBuilder to execute simple Python script
body: <p>I'm trying to use ProcessBuilder to execute a simple python script from CMD, which prints to the command line, then have that text read into Java and outputted through System.out.println() in netbeans. My issue is the BufferedReader seems to pause at .readLine() then output the text in bulk once the py script has stopped running, as opposed to outputting live. </p>
  
  <p>My process is as follows:</p>
  
  <p>[execute python script]</p>
  
  <pre><code>Executors.newSingleThreadExecutor().execute(this::TEST);
  </code></pre>
  
  <p>[run execution]</p>
  
  <pre><code>public void TEST(){
      try {
          ProcessBuilder py = new ProcessBuilder("cmd", "/C", "C:\\Users\\Documents\\TEST.py");
          String readLine;
          Process launch = py.start();
          BufferedReader reader = new BufferedReader(new InputStreamReader(launch.getInputStream()));
          while((readLine = reader.readLine()) != null){
              System.out.println(readLine);
          }
      } catch (IOException ex) {Logger.getLogger(Template.class.getName()).log(Level.SEVERE, null, ex);}
  }
  </code></pre>
  
  <p>[here is the python script i wish to run and read live]</p>
  
  <pre><code>import Tkinter, tkFileDialog, tkMessageBox
  
  
  root = Tkinter.Tk()
  root.withdraw()
  root.resizable(width=Tkinter.TRUE, height=Tkinter.TRUE)
  root.geometry('{}x{}'.format(400,600))
  
  print("hello1\n")
  print("hello2\n")
  print("hello3\n")
  print("hello4\n")
  print("hello5\n")
  tkMessageBox.showinfo("Complete!", "testing")
  print("hello6\n")
  print("hello7\n")
  print("hello8\n")
  print("hello9\n")
  print("hello10\n")
  tkMessageBox.showinfo("Complete!", "testing")
  </code></pre>
  
  <p>Thanks!!!</p>