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