Hello Community,
I was wondering if there is a possibility to pass a dictionary to another program?

What I want to do is send some information from one program to another, I want to use an array but I can't set keys and that is what I really need and I can't think of anyother way of doing this.

So if you could help or think of anyother way that'll be great, thanks.

Well the program the data is going to need to check to see if the other program (sender) has given all the required information. I don't know if you know PHP but I want an array like the PHP array (array("key1" => "value1", "key2" => "value2")) that way I can check if the array contains "key1" and "key2".

I do know PHP, but the content and structure of the shared data is largely irrelevant in this case. What you want to look at are IPC (interprocess communication) techniques. It could be as simple as dropping a serialized file from one process that the other reads or as much as direct communication between two processes using sockets or pipes.

Which option is best very much depends on what these programs do, where they run, and how the data will be used.

Well this might shed some light, the program I'm making is a ticket processor so "Program A" will have an error then send all the information such as the error other error details to "Program B". So "Program B" will check if "Program A" has given all the correct information for it to process the ticket and send it to me.

It sounds almost like you're working with a client-server setup. The client takes ticket requests and sends them to the server, then the server responds by creating a ticket and returning the result?

This question has already been answered. Start a new discussion instead.