Last change
on this file since 315 was
276,
checked in by sc, 10 years ago
|
Puzzlebox Synapse:
- split out into separate repository from Puzzlebox Brainstorms
|
-
Property svn:executable set to
*
|
File size:
1.0 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.Client as tgClient |
---|
10 | import Puzzlebox.Synapse.Configuration as tgConf |
---|
11 | import sys, signal |
---|
12 | |
---|
13 | try: |
---|
14 | import PySide as PyQt4 |
---|
15 | from PySide import QtCore |
---|
16 | except: |
---|
17 | print "Using PyQt4 module" |
---|
18 | from PyQt4 import QtCore |
---|
19 | else: |
---|
20 | print "Using PySide module" |
---|
21 | |
---|
22 | |
---|
23 | signal.signal(signal.SIGINT, signal.SIG_DFL) |
---|
24 | log = None |
---|
25 | DEBUG = 1 |
---|
26 | command_parameters = sys.argv[1:] |
---|
27 | |
---|
28 | server_host = tgConf.THINKGEAR_SERVER_HOST |
---|
29 | server_port = tgConf.THINKGEAR_SERVER_PORT |
---|
30 | |
---|
31 | for each in sys.argv: |
---|
32 | if each.startswith("--host="): |
---|
33 | server_host = each[ len("--host="): ] |
---|
34 | if each.startswith("--port="): |
---|
35 | server_port = each[ len("--port="): ] |
---|
36 | try: |
---|
37 | server_port = int(server_port) |
---|
38 | except: |
---|
39 | pass |
---|
40 | |
---|
41 | app = QtCore.QCoreApplication(sys.argv) |
---|
42 | client = tgClient.CLIClient(log, command_parameters, server_host, server_port, DEBUG=DEBUG) |
---|
43 | sys.exit(app.exec_()) |
---|
Note: See
TracBrowser
for help on using the repository browser.