OscListener

class supriya.tools.osctools.OscListener(client=None, debug_osc=False, debug_udp=False, timeout=1)[source]

An OSC listener

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_osctools { graph [label=osctools]; "supriya.tools.osctools.OscListener.OscListener" [color=black, fontcolor=white, group=1, label=<<B>OscListener</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; } subgraph cluster_threading { graph [label=threading]; "threading.Thread" [color=4, group=3, label=Thread, shape=box]; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "builtins.object" -> "threading.Thread"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.osctools.OscListener.OscListener"; "threading.Thread" -> "supriya.tools.osctools.OscListener.OscListener"; }

Bases

Attribute summary

daemon A boolean value indicating whether this thread is a daemon thread.
getName()
get_message()
ident Thread identifier of this thread or None if it has not been started.
isAlive() Return whether the thread is alive.
isDaemon()
is_alive() Return whether the thread is alive.
join([timeout]) Wait until the thread terminates.
name A string used for identification purposes only.
quit([wait])
run()
setDaemon(daemonic)
setName(name)
start() Start the thread’s activity.
__del__()
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__hash__() Hashes Supriya object.
__repr__() Gets interpreter representation of Supriya object.

Read-only properties

(Thread).ident

Thread identifier of this thread or None if it has not been started.

This is a nonzero integer. See the thread.get_ident() function. Thread identifiers may be recycled when a thread exits and another thread is created. The identifier is available even after the thread has exited.

Read/write properties

(Thread).daemon

A boolean value indicating whether this thread is a daemon thread.

This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False.

The entire Python program exits when no alive non-daemon threads are left.

(Thread).name

A string used for identification purposes only.

It has no semantics. Multiple threads may be given the same name. The initial name is set by the constructor.

Methods

(Thread).getName()
OscListener.get_message()[source]
(Thread).isAlive()

Return whether the thread is alive.

This method returns True just before the run() method starts until just after the run() method terminates. The module function enumerate() returns a list of all alive threads.

(Thread).isDaemon()
(Thread).is_alive()

Return whether the thread is alive.

This method returns True just before the run() method starts until just after the run() method terminates. The module function enumerate() returns a list of all alive threads.

(Thread).join(timeout=None)

Wait until the thread terminates.

This blocks the calling thread until the thread whose join() method is called terminates – either normally or through an unhandled exception or until the optional timeout occurs.

When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call isAlive() after join() to decide whether a timeout happened – if the thread is still alive, the join() call timed out.

When the timeout argument is not present or None, the operation will block until the thread terminates.

A thread can be join()ed many times.

join() raises a RuntimeError if an attempt is made to join the current thread as that would cause a deadlock. It is also an error to join() a thread before it has been started and attempts to do so raises the same exception.

OscListener.quit(wait=False)[source]
OscListener.run()[source]
(Thread).setDaemon(daemonic)
(Thread).setName(name)
(Thread).start()

Start the thread’s activity.

It must be called at most once per thread object. It arranges for the object’s run() method to be invoked in a separate thread of control.

This method will raise a RuntimeError if called more than once on the same thread object.

Special methods

OscListener.__del__()[source]
(SupriyaObject).__eq__(expr)

Is true when ID of expr equals ID of Supriya object. Otherwise false.

Returns boolean.

(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(SupriyaObject).__hash__()

Hashes Supriya object.

Required to be explicitely re-defined on Python 3 if __eq__ changes.

Returns integer.

(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.