diff options
| author | Devendra | 2014-06-17 03:27:05 +0530 | 
|---|---|---|
| committer | Devendra | 2014-06-17 03:27:05 +0530 | 
| commit | 2419ac0419fe74b582b94ed7784b3732049db9f2 (patch) | |
| tree | 64ece8341a4328cc41879ee89ff951e9e56e3f0f /python-tornado | |
| parent | 7865970148139babf2921b4d7fe11917568be9e9 (diff) | |
| download | pubnub-python-2419ac0419fe74b582b94ed7784b3732049db9f2.tar.bz2 | |
readme changes
Diffstat (limited to 'python-tornado')
| -rw-r--r-- | python-tornado/README.md | 14 | 
1 files changed, 14 insertions, 0 deletions
| 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! | 
