# Import needed modules from osc4py3
from osc4py3.as_eventloop import *
from osc4py3 import oscbuildparse
import time

# Start the system.
osc_startup()

# Make client channels to send packets.
osc_udp_client("172.18.0.3", 8000, "aclientname")

# Buils a complete bundle, and postpone its executions by 10 sec.
exectime = time.time() + 10   # execute in 10 seconds
stamp = oscbuildparse.unixtime2timetag(exectime)

# Build a simple message and send it.
msg = oscbuildparse.OSCMessage("/test/me", ",sift", ["text", 672, 8.871, stamp])
osc_send(msg, "aclientname")

# Build a message with autodetection of data types, and send it.
msg = oscbuildparse.OSCMessage("/test/me", None, ["text", 672, 8.871])
osc_send(msg, "aclientname")
    # …
osc_process()
    # …

# Properly close the system.
osc_terminate()