I'm working on a simple program where Max-msp send some integers via OSC to python. I'm using the pyOSC library for python. Now i can easily print the numbers but i can't decode it and use it as an integer inside python (i'm noob).
ideas?
import OSC
import time, threading
receive_address = '127.0.0.1', 9000
def printing_handler(addr, tags, stuff, source):
print "---"
print "received new osc msg from %s" % OSC.getUrlStr(source)
print "with addr : %s" % addr
print "typetags %s" % tags
print "data %s" % stuff
print "---"
s = OSC.OSCServer(receive_address)
s.addMsgHandler("/numero", printing_handler)
st = threading.Thread( target = s.serve_forever )
st.start()
thank you very much !