source: trunk/synapse/synapse-client.py @ 269

Last change on this file since 269 was 269, checked in by sc, 11 years ago

synapse/synapse-client.py:

  • updated to respect command line parameters

synapse/synapse-render_video.py:

  • removed from brainstorms repository
  • Property svn:executable set to *
File size: 1016 bytes
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
9import Puzzlebox.Synapse.Client as tgClient
10import Puzzlebox.Synapse.Configuration as tgConf
11import sys, signal
12
13try:
14        import PySide as PyQt4
15        from PySide import QtCore
16except:
17        print "Using PyQt4 module"
18        from PyQt4 import QtCore
19else:
20        print "Using PySide module"
21
22
23signal.signal(signal.SIGINT, signal.SIG_DFL)
24log = None
25DEBUG = 1
26command_parameters = sys.argv[1:]
27
28server_host = tgConf.THINKGEAR_SERVER_HOST
29server_port = tgConf.THINKGEAR_SERVER_PORT
30
31for 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
37app = QtCore.QCoreApplication(sys.argv)
38client = tgClient.CLIClient(log, command_parameters, server_host, server_port, DEBUG=DEBUG)
39sys.exit(app.exec_())
Note: See TracBrowser for help on using the repository browser.