I have written a python which used to take values from command line and process the same. 5 variables are taken using raw_input() and in each case something is returned to screen.
I want this whole interaction to happen via php program which calls my python program. They are supposed to exchange variables more than one time.
I have read the possible solutions like running the python through php via shell and passing arguments. But I am not sure how once I start my python program I can simply keep on sending variables to it so that my python program reaches its logical end by getting variables from php.
exec()call to suit this? Or maybe write them in a file which could then be read by the Python program? Or use a DB? A lot depends on what might sound most reasonable to you.