source: remote_control/puzzlebox_brainstorms_client_interface_network.py @ 111

Last change on this file since 111 was 111, checked in by sc, 11 years ago
  • PySide? import attempted before PyQt4 where available
  • problem specifying port when calling socket.listen on QTcpServer
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# Puzzlebox - Brainstorms - Client Interface - Qt - Network
5#
6# Copyright Puzzlebox Productions, LLC (2010)
7#
8# This code is released under the GNU Pulic License (GPL) version 2
9# For more information please refer to http://www.gnu.org/copyleft/gpl.html
10#
11# Last Update: 2010.07.10
12#
13#####################################################################
14
15import os, sys
16
17try:
18        import PySide as PyQt4
19        from PySide import QtGui
20except:
21        print "Using PyQt4 module"
22        from PyQt4 import QtGui
23else:
24        print "Using PySide module"
25
26#from PyQt4 import QtGui
27#from PySide import QtGui
28
29
30import puzzlebox_brainstorms_client_interface as client_interface
31#import puzzlebox_logger
32
33#####################################################################
34# Globals
35#####################################################################
36
37DEBUG = 1
38
39#####################################################################
40# Classes
41#####################################################################
42
43#####################################################################
44# Functions
45#####################################################################
46
47#####################################################################
48# Main
49#####################################################################
50
51if __name__ == '__main__':
52       
53        #log = puzzlebox_logger.puzzlebox_logger(logfile='client_interface')
54        log = None
55       
56        #for each in sys.argv:
57               
58                #if each.startswith("--host="):
59                        #server_host = each[ len("--host="): ]
60                #if each.startswith("--port="):
61                        #server_port = each[ len("--port="): ]
62       
63        app = QtGui.QApplication(sys.argv)
64       
65        window = client_interface.puzzlebox_brainstorms_client_interface(log, DEBUG=DEBUG)
66        window.show()
67       
68        sys.exit(app.exec_())
69
70
Note: See TracBrowser for help on using the repository browser.