Changing the IP address is a big no-no. It would break every other application on the PC that used the network, and cause no end of problems.
There are a few solutions that come to mind.
1) The first is to have one system that acts as a name server - the other PCs have to be given the address of this system, and they register with it when they start up. They can then query it to find out where all the others are. This is essentially how systems like CORBA work, and even the internet itself. If you use CORBA for communicating between hosts then you should get a name server as part of the CORBA framework. I have used omniORB
which has very good Python support.
2) The next solution is to send broadcast or multicast packets out asking for the other programs to respond. This requires knowledge of low level socket programming. You should get an assigned port number from the IANA
so that you know which port to listen on for your other applications' broadcasts. You will also need to define a protocol for your applications to talk to each other.
3) Windows has an API for finding the other Windows systems on the network - this is what is used when you browse 'Network Neighbourhood'. You could use the Win32All extensions to get a list of available systems on the network and interrogate each one for your application. This has two disadvantages: (a) it is SLOOOOOW. (b) If a PC does not have network sharing enabled it may not appear on the network list.
I have used both (1) and (2) in the past, and on balance I would recommend going with (1) if you can.
Dave - The Developers' Coach