Commit 36348281 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Changed class variable name format.

parent dc48af59
......@@ -7,10 +7,10 @@ class GestureTracker(Logger):
changing the state of touch points.
"""
# Supported gesture types
__gesture_types__ = []
gesture_types = []
# Configurable properties (see configure() method)
__configurable__ = []
configurable = []
def __init__(self, window=None):
# Hashmap of gesture types
......@@ -25,7 +25,7 @@ class GestureTracker(Logger):
single gesture type. Optionally, (keyword) arguments that will be
passed to the handler along with a Gesture object can be specified.
"""
if gesture_type not in self.__gesture_types__:
if gesture_type not in self.gesture_types:
raise ValueError('Unsupported gesture type "%s".' % gesture_type)
h = handler, args, kwargs
......@@ -60,7 +60,7 @@ class GestureTracker(Logger):
def configure(self, **kwargs):
for name, value in kwargs.iteritems():
if name not in self.__configurable__:
if name not in self.configurable:
raise ValueError('%s.%s is not a configurable property.'
% (self.__class__.__name__, name))
......@@ -73,7 +73,7 @@ class GestureTracker(Logger):
instead of:
tracker.bind('gesture', ...)
"""
if name not in self.__gesture_types__:
if name not in self.gesture_types:
raise AttributeError("'%s' has no attribute '%s'"
% (self.__class__.__name__, name))
......
......@@ -6,13 +6,13 @@ from screen import pixel_coords
class TuioServer2D(InputServer):
__tuio_address__ = 'localhost', 3333
tuio_address = 'localhost', 3333
def __init__(self, handler_obj):
super(TuioServer2D, self).__init__(handler_obj)
# OSC server that listens to incoming TUIO events
self.server = OSCServer(self.__tuio_address__)
self.server = OSCServer(self.tuio_address)
self.server.addDefaultHandlers()
self.server.addMsgHandler('/tuio/2Dobj', self._receive)
self.server.addMsgHandler('/tuio/2Dcur', self._receive)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment