Last change
on this file since 192 was
163,
checked in by sc, 12 years ago
|
- Merge of code from repackaging by John Schutte <g.john.schutte@…>
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | |
---|
4 | # Copyright Puzzlebox Productions, LLC (2010) |
---|
5 | # |
---|
6 | # This code is released under the GNU Pulic License (GPL) version 2 |
---|
7 | # For more information please refer to http://www.gnu.org/copyleft/gpl.html |
---|
8 | |
---|
9 | import Puzzlebox.Synapse.Server as tgServer |
---|
10 | import Puzzlebox.Synapse.Configuration as tgConf |
---|
11 | |
---|
12 | import sys, signal |
---|
13 | |
---|
14 | try: |
---|
15 | import PySide as PyQt4 |
---|
16 | from PySide import QtCore |
---|
17 | except: |
---|
18 | print "Using PyQt4 module" |
---|
19 | from PyQt4 import QtCore |
---|
20 | else: |
---|
21 | print "Using PySide module" |
---|
22 | |
---|
23 | # Perform correct KeyboardInterrupt handling |
---|
24 | signal.signal(signal.SIGINT, signal.SIG_DFL) |
---|
25 | log = None |
---|
26 | |
---|
27 | server_interface = tgConf.THINKGEAR_SERVER_INTERFACE |
---|
28 | server_port = tgConf.THINKGEAR_SERVER_PORT |
---|
29 | device_address = tgConf.THINKGEAR_DEVICE_SERIAL_PORT |
---|
30 | |
---|
31 | for each in sys.argv: |
---|
32 | if each.startswith("--interface="): |
---|
33 | server_interface = each[ len("--interface="): ] |
---|
34 | if each.startswith("--port="): |
---|
35 | server_port = each[ len("--port="): ] |
---|
36 | if each.startswith("--device="): |
---|
37 | device_address = each[ len("--device="): ] |
---|
38 | |
---|
39 | app = QtCore.QCoreApplication(sys.argv) |
---|
40 | server = tgServer.ThinkgearServer(log, server_interface, server_port, device_address, emulate_headset_data = tgConf.THINKGEAR_ENABLE_SIMULATE_HEADSET_DATA, DEBUG=1) |
---|
41 | server.start() |
---|
42 | sys.exit(app.exec_()) |
---|
Note: See
TracBrowser
for help on using the repository browser.