IMPORTANT: This article is being preserved for historical purposes and likely no longer reflects the state of AT-SPI over D-Bus.
Toggle line numbers
1 Index: src/orca/httpserver.py
2 ===================================================================
3 --- src/orca/httpserver.py (revision 3211)
4 +++ src/orca/httpserver.py (working copy)
5 @@ -37,6 +37,7 @@
6
7 _httpRequestThread = None
8
9 +from pyatspi.atspilogger import LOG_OBJ
10
11 # Handlers for logging speech and braille output.
12 #
13 @@ -92,6 +93,15 @@
14 self.send_header("Content-type", "text/html")
15 self.end_headers()
16 self.wfile.write("%s" % speech.isSpeaking())
17 + elif inputBody.startswith("atspilog:"):
18 + command = inputBody.split("atspilog:")[1]
19 + if command == "on":
20 + print "Turning On"
21 + LOG_OBJ.enable = True
22 + else:
23 + print "Turning Off"
24 + LOG_OBJ.enable = False
25 + self.send_response(200, 'OK')
26 elif inputBody.startswith("log:"):
27 import logging
28 logFile = inputBody[4:]