aboutsummaryrefslogtreecommitdiff
path: root/inputs
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-29 12:43:05 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-29 12:43:05 -0500
commitc8209d01f9ddf4c6670caee08073924cb33e447f (patch)
tree1e649deb239e56d8f5c5f95482bf78c70c393ebf /inputs
parentf9aeaf10e3c9077504a78374640e79415734546b (diff)
setting up some more behaviors to get inherited from
Diffstat (limited to 'inputs')
-rw-r--r--inputs/MouseFollower.xml8
-rw-r--r--inputs/TCPInput.py5
2 files changed, 11 insertions, 2 deletions
diff --git a/inputs/MouseFollower.xml b/inputs/MouseFollower.xml
new file mode 100644
index 0000000..7d7963d
--- /dev/null
+++ b/inputs/MouseFollower.xml
@@ -0,0 +1,8 @@
+<InputElement>
+ <Class>inputs.PygameInput</Class>
+ <Args>
+ <Id>followmouse</Id>
+ <RefreshInterval>50</RefreshInterval>
+ <FollowMouse>True</FollowMouse>
+ </Args>
+</InputElement>
diff --git a/inputs/TCPInput.py b/inputs/TCPInput.py
index 1517afa..197045f 100644
--- a/inputs/TCPInput.py
+++ b/inputs/TCPInput.py
@@ -1,6 +1,7 @@
import util.Strings as Strings
from operationscore.Input import *
import socket, json, time
+import logging as main_log
class TCPInput(Input):
def inputInit(self):
self.HOST = '' # Symbolic name meaning all available interfaces
@@ -16,9 +17,9 @@ class TCPInput(Input):
def sensingLoop(self):
data = self.conn.recv(self.BUFFER_SIZE)
- print data
+ main_log.debug('Incoming data', data)
if not data or 'end' in data: # data end, close socket
- print 'END!!'
+ main_log.debug('End in data')
self.IS_RESPONDING = 0
self.sock.close()