Commits

Jason R. Coombs committed 46791f7

Add some documentation strings; remove unused variable

  • Participants
  • Parent commits c3ba8a2

Comments (0)

Files changed (1)

 	exposed = True
 
 def load_al_module(name):
+	"""
+	Add a proxy to the AL Module named by `name` to the CherryPy request.
+	"""
 	cherrypy.serving.request.module = naoqi.ALProxy(name, 'localhost', 9559)
+
+# install the AL Module Loader as a CherryPy tool.
 cherrypy.tools.al_module_loader = cherrypy.Tool('before_handler', load_al_module)
 
 class Behavior(BaseHandler):
 		req.module.setOutputVolume(int(req.body.read()))
 
 class AudioDevice(BaseHandler):
+	"A base handler for the ALAudioDevice"
+
 	_cp_config = {
 		'tools.al_module_loader.on': True,
 		'tools.al_module_loader.name': 'ALAudioDevice',
 	volume = AudioVolume()
 
 class TextToSpeech(BaseHandler):
+	"A handler for ALTextToSpeech"
+
 	_cp_config = {
 		'tools.al_module_loader.on': True,
 		'tools.al_module_loader.name': 'ALTextToSpeech',
 	memory = Memory()
 
 	def GET(self):
+		"Provide a simple link to the controller"
 		return 'Welcome to <a href="controller">NAO</a>'
 
 this_dir = os.path.dirname(__file__)
 	cherrypy.config.update(config)
 	cherrypy.tree.mount(Root(), config=config)
 	cherrypy.engine.start()
-	tts = naoqi.ALProxy("ALTextToSpeech", 'localhost', 9559)
-	#tts.say("Cherry Nao engaged")
 
 def stop():
 	cherrypy.engine.exit()