# sending files through a network with python [closed]

I'm building a multi-agent system with python, the first agent built a model and saved it in yaml file, it saved also the weights in hdf5 file, then it must send this 2 files to the second agent. the files are saved in my pc, and the 2 agents also are in my pc. how could the first agent send the 2 files to the second one? thank you.

• Can you be a bit more specific? Perhaps with an example... and what have you already found online and tried? Jul 6 '18 at 11:37
• the first agent built a model and save it in yaml file, it save also the weights in hdf5 file, then it must send this 2 files to the second agent.
– user
Jul 6 '18 at 11:41
• Where exactly are the agents here? Where did the files get saved? Agent1 could save it to a location for Agent2 to read from. Or do they just run on separate threads? In which case you could look at using a Queue from the queue module. Jul 6 '18 at 11:51
• the fikes will be saved im my own pc. the 2 agents are connected to localhost.
– user
Jul 6 '18 at 11:53
• I think you should try to add more information to your post (edit it... comments are not good because other people might not read them all). It would also be a good idea to describe how are you currently thinking of doing it. If it is all on your pc, why not just have a single directory that both agents know? Then you only need to let Agent2 know when a new pair of files has been written by Agent1, so it can then read them. Jul 6 '18 at 11:59

## 1 Answer

Since both agents are on the same computer, save both files to a directory. The second agent can read both files from the directory.