Use API mode.
This way, every message sent to your python program would be encapsulated on his own packet. On the header of this packet, you can get the mac address of the module that sent the message.
The frames you need are Transmit Request (type 0x10) and Receive Packet (0x90). Take a look:
More information about API mode and frame types: