title: Two-way communication between C# WPF application and python script
body: <p>I'm trying to get a tow-way communication between a c# application and a python script that c# will call. </p>
  
  <p>I have some input channels in c# that changes constantly at high frequency (5000-1000 data/s) for let's say a minute. On every change of those inputs,results are calculated and assigned to output variables. What i'm trying to do is to move the logic to a python script. For instance:</p>
  
  <ul>
  <li>Inputs: double x,y</li>
  <li>Output: double z</li>
  </ul>
  
  <p>So the pyhton script should be capable of read the inputs, perform the logic and write the results at a symilar frequency.</p>
  
  <p>Any recomendations? Has anyone did anything similar before?</p>
  
  <p>First I tried to call the script on every change and read the console output. But the code in the script is not as simple as z=x*y and variables that store values are required in the pyhon script. For example, the script mught want to save the maximum value of x and y reached. </p>
  
  <p>I had a look to ZeroMQ library for the communication, not sure how to use it though.</p>