aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgcohen2014-12-29 18:28:53 -0800
committergcohen2014-12-29 18:28:53 -0800
commit0da436b0a940690b1fa1af1951b8ca1d1e94fff3 (patch)
treedf8d3e84923c0439f774b1277581877a05f604dd
parent3a5a980b3c75e6eee176fdc23b63855cee30ceff (diff)
downloadpubnub-python-0da436b0a940690b1fa1af1951b8ca1d1e94fff3.tar.bz2
fixing subscribe and adding keys
-rw-r--r--python/examples/futureHouse/futureHouse.py11
1 files changed, 6 insertions, 5 deletions
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