Redirect output of Cache write command to Python interpreter
Hi,
I am experimenting with Cache-Python binding. In the following piece of Python code
import intersys.pythonbind3
conn = intersys.pythonbind3.connection( )
conn.connect_now('localhost[1972]:SAMPLES', '_SYSTEM', '123', None)
samplesDB = intersys.pythonbind3.database(conn)
p10 = samplesDB.openid("Sample.Person",'10',-1,-1)
p10.run_obj_method("PrintPerson",[])
I am opening the 10th record of Sample.Person class and then I am calling an object method (PrintPerson).
Method PrintPerson()
{
Write !, "Name: ", ..Name
Quit
}
How can I redirect the output of Write command so that Person's name is printed on Python interpreter ?
I searched a bit on TCP Client/Server communication and specifically the WRITE Command for TCP Devices. I am not sure how I can configure this and where exactly to place call such as
open "|TCP|4":("127.0.0.1":4200::$CHAR(3,4)):10
use "|TCP|4"
Could you please write down the exact solution so that I can run a test on my localhost ?