aboutsummaryrefslogtreecommitdiffstats
path: root/python/examples/publish.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/publish.py')
-rw-r--r--python/examples/publish.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/examples/publish.py b/python/examples/publish.py
index 029c17a..a1b913b 100644
--- a/python/examples/publish.py
+++ b/python/examples/publish.py
@@ -20,17 +20,16 @@ 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 = 'hello_world'
-message = 'Hello World !!!'
-
+channel = 'hello_world'
+message = 'Hello World !!!'
# Synchronous usage
-
print pubnub.publish(channel, message)
# Asynchronous usage
+
def callback(message):
print(message)