package multinomad.algorithms;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TestPython {

	public static void main(String[] args) {
		String[] cmd = {
			      "python",
			      "-c",
			      "'from demo import bounds; print bounds(2)'"
			    };
		
		
		try {
			System.out.println("Estoy");
			Process p = Runtime.getRuntime().exec("python demo.py 3");
			BufferedReader stdInput = new BufferedReader(new 
	                 InputStreamReader(p.getInputStream()));

            // read the output from the command
            System.out.println("Here is the standard output of the command:\n");
            String s;
            while ((s = stdInput.readLine()) != null) {
	                System.out.println(s);
            }
	            

			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
