diff options
| author | Devendra | 2014-04-23 21:35:06 +0530 | 
|---|---|---|
| committer | Devendra | 2014-04-23 21:35:06 +0530 | 
| commit | f7b89bfafae34fa22509c1d1c59d1284ec62c5df (patch) | |
| tree | 2eeaf63f906ade16c82c86844e8f76b191b9ad6c /python-twisted/examples | |
| parent | 1d97c69f186719fe007a4fa0033d39d9a68a4e43 (diff) | |
| download | pubnub-python-f7b89bfafae34fa22509c1d1c59d1284ec62c5df.tar.bz2 | |
exception handling changes
Diffstat (limited to 'python-twisted/examples')
| -rw-r--r-- | python-twisted/examples/here-now-example.py | 13 | 
1 files changed, 6 insertions, 7 deletions
| diff --git a/python-twisted/examples/here-now-example.py b/python-twisted/examples/here-now-example.py index bba7d21..14f45c4 100644 --- a/python-twisted/examples/here-now-example.py +++ b/python-twisted/examples/here-now-example.py @@ -10,7 +10,8 @@  ## -----------------------------------  import sys -from twisted.internet import reactor +sys.path.append('..') +sys.path.append('../../common')  from Pubnub import Pubnub  publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' @@ -32,14 +33,12 @@ crazy = 'hello_world'  def here_now_complete(messages):      print(messages) -    reactor.stop() +    pubnub.stop() -pubnub.here_now({ -    'channel': crazy, -    'callback': here_now_complete -}) +pubnub.here_now( +    channel=crazy, callback=here_now_complete, error=here_now_complete)  ## -----------------------------------------------------------------------  ## IO Event Loop  ## ----------------------------------------------------------------------- -reactor.run() +pubnub.start() | 
