title: Using python to interact with a command line program
body: <p>(new to python so bear with me...)</p>
  
  <p>I have a simple java jar file that when executed, it asks the user for some basic data in a command prompt and then executes an operation based on this data.
  I want to write a simple python script that will automate the execution of this jar file without the need for the user to supply the data, meaning writing the data inside the script and basically interact with the java application when asked by the command prompt.</p>
  
  <p>Think of a java file that is executed by running Java -jar someJavaApp.jar
  Then a command prompt is asking for you name. you enter it and press enter, then it asks for your last name, you enter it and press enter and then the java app executes an arbitrary operation based on the input.</p>
  
  <p>I want to have a python script that I can execute the java app several times, each time with different inputs taken from a file or something similar.
  Any help will be appreciated.</p>
  
  <p>Thanks.</p>