source: remote_control/puzzlebox_brainstorms_client_thinkgear.py @ 48

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

client:

  • Switched to JSON from Pickle for message encodings
  • Fixed but with command line client not respecting custom server host/port settings

configuration.ini:

  • thinkgear server settings added

configuration.py

  • thinkgear server settings added

server:

  • Switched to JSON from Pickle for message encodings

client_thinkgear:

File size: 1.9 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# Puzzlebox - Brainstorms - Client - ThinkGear Connector
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.06.16
12#
13#####################################################################
14
15import os, sys
16import simplejson as json
17
18from twisted.internet import reactor, protocol, defer
19
20import puzzlebox_brainstorms_configuration as configuration
21import puzzlebox_brainstorms_client as client
22
23#####################################################################
24# Globals
25#####################################################################
26
27DEBUG = 1
28
29SERVER_HOST = configuration.THINKGEAR_SERVER_HOST
30SERVER_PORT = configuration.THINKGEAR_SERVER_PORT
31
32MAX_CONNECTION_ATTEMPTS = configuration.MAX_CONNECTION_ATTEMPTS
33NO_REPLY_WAIT = configuration.NO_REPLY_WAIT
34
35AUTHORIZATION_REQUEST = configuration.THINKGEAR_AUTHORIZATION_REQUEST
36
37#####################################################################
38# Classes
39#####################################################################
40
41
42#####################################################################
43# Main
44#####################################################################
45
46if __name__ == '__main__':
47       
48        #log = puzzlebox_logger.puzzlebox_logger(logfile='client')
49        log = None
50       
51        command_parameters = AUTHORIZATION_REQUEST
52       
53        #log.info("Command parameters: %s" % command_parameters)
54       
55        thinkgear_client = client.puzzlebox_brainstorms_client_command_line( \
56                    log, \
57                    command_parameters, \
58                    server_host=SERVER_HOST, \
59                    server_port=SERVER_PORT, \
60                    DEBUG=DEBUG)
61       
62        reactor.callWhenRunning(thinkgear_client.execute_command_line)
63        reactor.run()
64
Note: See TracBrowser for help on using the repository browser.