OSC has a concept of message address that is different from the network address of the device you are connecting to. The idea is that the message you send can be redirected to one of many different handlers at the other end of the network connection. Each handler has its own address, which is usually indicated by the prefix '/'.
Using the same client code from the question you are referring to :
import OSC
c = OSC.OSCClient()
c.connect(('127.0.0.1', 57120))
oscmsg = OSC.OSCMessage()
oscmsg.setAddress("/startup")
oscmsg.append('HELLO')
c.send(oscmsg)
First run this server code:
import OSC
def handler(addr, tags, data, client_address):
txt = "OSCMessage '%s' from %s: " % (addr, client_address)
txt += str(data)
print(txt)
if __name__ == "__main__":
s = OSC.OSCServer(('127.0.0.1', 57120))
s.addMsgHandler('/startup', handler)
s.serve_forever()
Then start the client from another terminal. On the server side, you should get something like:
OSCMessage '/startup' from ('127.0.0.1', 55018): ['HELLO']
, pyOSC, - . OSC.py . , , , , .