title: Communication between OCaml and Python
body: <p>I would like to know the best way to send data from OCaml to Python and get response from Python back to OCaml. </p>
  
  <p>One naive method I can think is as follows.</p>
  
  <p>1) In OCaml, write data into a file (input.txt) on file system. </p>
  
  <p>2) In OCaml, run python, which opens input.txt and reads the data and write the execution result into output.txt</p>
  
  <p>3) In OCaml, open output.txt and read the result</p>
  
  <p>Is there other easy ways to do this kind of task?</p>
  
  <p>Thanks in advance.</p>