From 0da436b0a940690b1fa1af1951b8ca1d1e94fff3 Mon Sep 17 00:00:00 2001 From: gcohen Date: Mon, 29 Dec 2014 18:28:53 -0800 Subject: fixing subscribe and adding keys --- python/examples/futureHouse/futureHouse.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/examples/futureHouse/futureHouse.py b/python/examples/futureHouse/futureHouse.py index 55286a2..87a6e6d 100644 --- a/python/examples/futureHouse/futureHouse.py +++ b/python/examples/futureHouse/futureHouse.py @@ -1,9 +1,9 @@ import sys from Pubnub import Pubnub -publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' -subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' -secret_key = len(sys.argv) > 3 and sys.argv[3] or 'demo' +publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo-36' +subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo-36' +secret_key = len(sys.argv) > 3 and sys.argv[3] or 'demo-36' cipher_key = len(sys.argv) > 4 and sys.argv[4] or '' ssl_on = len(sys.argv) > 5 and bool(sys.argv[5]) or False @@ -13,7 +13,7 @@ ssl_on = len(sys.argv) > 5 and bool(sys.argv[5]) or False pubnub = Pubnub(publish_key=publish_key, subscribe_key=subscribe_key, secret_key=secret_key, cipher_key=cipher_key, ssl_on=ssl_on) -channel = 'a' +channel = 'futureHouse' # Asynchronous usage @@ -37,4 +37,5 @@ def disconnect(message): print("DISCONNECTED") -pubnub.subscribe(channel, callback=callback, error=callback, \ No newline at end of file +pubnub.subscribe(channel, callback=callback, error=callback, + connect=connect, reconnect=reconnect, disconnect=disconnect) \ No newline at end of file -- cgit v1.2.3