diff options
| author | Devendra | 2014-04-16 00:00:40 +0530 | 
|---|---|---|
| committer | Devendra | 2014-04-16 00:00:40 +0530 | 
| commit | 150ae1566d813acbb773839e919db2c0f467931c (patch) | |
| tree | 6f74d6dcdcb0ecff6d8a51988d8a461b6f9a4668 /python-tornado/tests/subscribe-test.py | |
| parent | 99096b8c11b9a541f6350639e8735495cf90091c (diff) | |
| download | pubnub-python-150ae1566d813acbb773839e919db2c0f467931c.tar.bz2 | |
adding code to support async and pam client capabilities with python v2 and v3
Diffstat (limited to 'python-tornado/tests/subscribe-test.py')
| -rwxr-xr-x | python-tornado/tests/subscribe-test.py | 19 | 
1 files changed, 9 insertions, 10 deletions
| diff --git a/python-tornado/tests/subscribe-test.py b/python-tornado/tests/subscribe-test.py index 0d4c65e..be4a416 100755 --- a/python-tornado/tests/subscribe-test.py +++ b/python-tornado/tests/subscribe-test.py @@ -38,31 +38,31 @@ received = 0  ## Subscribe Example  ## -----------------------------------------------------------------------  def message_received(message): -    print message +    print(message)  def check_received(message):      global current      global errors      global received -    print message -    print current +    print(message) +    print(current)      if message <= current: -        print 'ERROR' +        print('ERROR')          #sys.exit()          errors += 1      else:          received += 1 -    print 'active thread count : ', threading.activeCount() -    print 'errors = ' , errors -    print current_thread().getName(), ' , ', 'received = ', received +    print('active thread count : ' + str( threading.activeCount())) +    print('errors = ' + str(errors)) +    print(current_thread().getName() +  ' , ' +  'received = ' +  str(received))      if received != message: -        print '********** MISSED **************** ', message - received  +        print('********** MISSED **************** ' + str( message - received ))      current = message  def connected_test(ch) : -    print 'Connected' , ch +    print('Connected '  +  ch)  def connected(ch) :      pass @@ -103,7 +103,6 @@ def subscribe(channel):  	}) -print threading.activeCount()  pubnub.timeout(15,cb1) | 
