Installation

python-osc is a pure python library that has no external dependencies,
to install it just use pip (prefered):

$ pip install python-osc

or from the raw sources for the development version:

$ python setup.py test
$ python setup.py install

Examples

Simple client

"""
This program sends 10 random values between 0.0 and 1.0 to the /filter address,
waiting for 1 seconds between each value.
"""importargparseimportrandomimporttimefrompythonoscimportosc_message_builderfrompythonoscimportudp_clientif__name__=="__main__":parser=argparse.ArgumentParser()parser.add_argument("--ip",default="127.0.0.1",help="The ip of the OSC server")parser.add_argument("--port",type=int,default=8000,help="The port the OSC server is listening on")args=parser.parse_args()client=udp_client.UDPClient(args.ip,args.port)forxinrange(10):msg=osc_message_builder.OscMessageBuilder(address="/filter")msg.add_arg(random.random())msg=msg.build()client.send(msg)time.sleep(1)