diff options
| author | Devendra | 2014-06-18 02:40:06 +0530 | 
|---|---|---|
| committer | Devendra | 2014-06-18 02:40:06 +0530 | 
| commit | 2504fdad66f5372f8200e3b1b340c5043cc3e745 (patch) | |
| tree | 9ded20b5d4c1ac7683126231cc874ed5e1da9913 | |
| parent | 692a1e9d7f6ef7a678cb536c303b204bb65d1a11 (diff) | |
| download | pubnub-python-2504fdad66f5372f8200e3b1b340c5043cc3e745.tar.bz2 | |
readme updated for subscribe_sync
| -rw-r--r-- | python/README.md | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/python/README.md b/python/README.md index c077918..a3a6de8 100644 --- a/python/README.md +++ b/python/README.md @@ -60,6 +60,22 @@ pubnub.subscribe(channel, callback=callback, error=callback,                   connect=connect, reconnect=reconnect, disconnect=disconnect)  ``` +#### SUBSCRIBE Synchronous ( pre 3.5 version ) +Runs in tight loop if callback return True. +Loop ends when callback return False +``` +# Listen for Messages + +channel = 'hello_world' + +def callback(message): +    print(message) +    return True + +pubnub.subscribe_sync(channel, callback=callback) +``` + +  #### UNSUBSCRIBE  ``` | 
