This test shows a real mobile agent system. It is nearly
identical to the "agent" example but with one real big difference:

This example really has mobile code.

That is, the server doesn't have the agent code (python module)
available and will download it from the client!
The server is in the "serv" directory, and you can see that
there is no ShoppingAgent.py module there. Only the client has it.

As soon as the client sends a ShoppingAgent to the server, the
server reports back that it doesn't have the code. The client then
uploads the module to the server and the program continues just
as if the module could be loaded after all.

Notice that this happens IN PYRO; the server only has to enable
the mobile code feature. In this case it also installs a codeValidator
because the default codeValidator accepts ALL INCOMING CODE.

The client doesn't have to do anything special to make this work.

In fact, you can use the client from the "agent" example just fine!


NOTE that once the code is downloaded on the server, it stays there.
It is not downloaded again. So there is a possible version control issue here.
If the server keeps running and the client has updated its agent code in
the meantime, the server will not notice this, and it will continue to use
the previous (old) agent code.


