title: How do i append data from process.popen
body: <p>I'm trying to run the next code:</p>
  
  <pre><code>import os
  import subprocess
  import sys
  
  p = subprocess.Popen(['java', '-mx2g', '-cp', '''*''', 'edu.stanford.nlp.scenegraph.RuleBasedParser', ], stdin=subprocess.PIPE,stdout=subprocess.PIPE)
  out, err = p.communicate('the brown cat chased the white fox\n')
  </code></pre>
  
  <p>Which uses Stanford's core NLP, once the subprocess.Popen() row runs the algorithm waits for an input which i'm sending by using communicate() i expect to get my output in the variable our but it's comes out to be None although when observing the terminal i see the correct output:</p>
  
  <pre><code>Processing from stdin. Enter one sentence per line.
  &gt; [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
  [main] INFO edu.stanford.nlp.pipeline.TokenizerAnnotator - TokenizerAnnotator: No tokenizer type provided. Defaulting to PTBTokenizer.
  [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
  [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator parse
  [main] INFO edu.stanford.nlp.parser.common.ParserGrammar - Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ... 
  done [3.3 sec].
  [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator lemma
  [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ner
  Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [5.9 sec].
  Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [2.0 sec].
  Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [3.2 sec].
  [main] INFO edu.stanford.nlp.time.JollyDayHolidays - Initializing JollyDayHoliday for SUTime from classpath edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml as sutime.binder.1.
  Reading TokensRegex rules from edu/stanford/nlp/models/sutime/defs.sutime.txt
  Jun 30, 2018 6:11:08 PM edu.stanford.nlp.ling.tokensregex.CoreMapExpressionExtractor appendRules
  INFO: Read 83 rules
  Reading TokensRegex rules from edu/stanford/nlp/models/sutime/english.sutime.txt
  Jun 30, 2018 6:11:11 PM edu.stanford.nlp.ling.tokensregex.CoreMapExpressionExtractor appendRules
  INFO: Read 267 rules
  Reading TokensRegex rules from edu/stanford/nlp/models/sutime/english.holidays.sutime.txt
  Jun 30, 2018 6:11:12 PM edu.stanford.nlp.ling.tokensregex.CoreMapExpressionExtractor appendRules
  INFO: Read 25 rules
  source              reln                target              
  ---                 ----                ---                 
  cat-3               chase               fox-7               
  
  
  Nodes               
  ---                 
  cat-3               
    -brown               
  fox-7               
    -white               
  
  ------------------------
  &gt; Exception in thread "main" java.util.NoSuchElementException: No line found
      at java.util.Scanner.nextLine(Scanner.java:1540)
      at edu.stanford.nlp.scenegraph.RuleBasedParser.main(RuleBasedParser.java:253)
  </code></pre>