From 2419ac0419fe74b582b94ed7784b3732049db9f2 Mon Sep 17 00:00:00 2001 From: Devendra Date: Tue, 17 Jun 2014 03:27:05 +0530 Subject: readme changes --- python-tornado/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'python-tornado') diff --git a/python-tornado/README.md b/python-tornado/README.md index 1d210f9..406b556 100644 --- a/python-tornado/README.md +++ b/python-tornado/README.md @@ -11,6 +11,20 @@ from Pubnub import PubnubTornado as Pubnub pubnub = Pubnub(publish_key="demo", subscribe_key="demo", ssl_on=False) +#### Publish Example +``` +channel = 'hello_world' +message = 'Hello World !!!' + +# Asynchronous usage + + +def callback(message): + print(message) + +pubnub.publish(channel, message, callback=callback, error=callback) +``` + #### IO Event Loop ##### VERY IMPORTANT TO ADD THIS LINE AT THE VERY BOTTOM! -- cgit v1.2.3