diff options
| author | Devendra | 2015-06-16 14:10:23 +0530 |
|---|---|---|
| committer | Devendra | 2015-06-16 14:10:23 +0530 |
| commit | 2ed5ac76e9719d3ba53ed9f7245c53e37347bddd (patch) | |
| tree | f71254af529c39657fcb70ea96155c390bd3f234 | |
| parent | 260d5fce4bf9f03f34584773dcac5f1d952a0d85 (diff) | |
| download | pubnub-python-2ed5ac76e9719d3ba53ed9f7245c53e37347bddd.tar.bz2 | |
changing Pubnub to pubnub in files
53 files changed, 61 insertions, 58 deletions
diff --git a/common/unit-test-async.py b/common/unit-test-async.py index c4dfb65..7b2c4fe 100644 --- a/common/unit-test-async.py +++ b/common/unit-test-async.py @@ -12,7 +12,7 @@ import sys import time import random -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/README.md b/python-tornado/README.md index 59e79b7..eaa2fe0 100644 --- a/python-tornado/README.md +++ b/python-tornado/README.md @@ -12,7 +12,7 @@ pubnub.start() #### Import ``` -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub ``` #### Init diff --git a/python-tornado/examples/audit.py b/python-tornado/examples/audit.py index 77d189b..3f6af13 100644 --- a/python-tornado/examples/audit.py +++ b/python-tornado/examples/audit.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python-tornado/examples/grant.py b/python-tornado/examples/grant.py index daf7434..e2726b9 100644 --- a/python-tornado/examples/grant.py +++ b/python-tornado/examples/grant.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python-tornado/examples/here-now.py b/python-tornado/examples/here-now.py index 5c195f1..7018be7 100644 --- a/python-tornado/examples/here-now.py +++ b/python-tornado/examples/here-now.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/examples/history.py b/python-tornado/examples/history.py index daf1c6e..ff85545 100644 --- a/python-tornado/examples/history.py +++ b/python-tornado/examples/history.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/examples/presence_group.py b/python-tornado/examples/presence_group.py index bb89420..38181cf 100644 --- a/python-tornado/examples/presence_group.py +++ b/python-tornado/examples/presence_group.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/examples/publish.py b/python-tornado/examples/publish.py index 04e88fd..997adfa 100644 --- a/python-tornado/examples/publish.py +++ b/python-tornado/examples/publish.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/examples/revoke.py b/python-tornado/examples/revoke.py index 1e4487e..4bdd9c7 100644 --- a/python-tornado/examples/revoke.py +++ b/python-tornado/examples/revoke.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python-tornado/examples/subscribe.py b/python-tornado/examples/subscribe.py index 72f0fc1..96c6ebb 100644 --- a/python-tornado/examples/subscribe.py +++ b/python-tornado/examples/subscribe.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/examples/subscribe_group.py b/python-tornado/examples/subscribe_group.py index eddcf8d..394821a 100644 --- a/python-tornado/examples/subscribe_group.py +++ b/python-tornado/examples/subscribe_group.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/migration.md b/python-tornado/migration.md index d5fd8f0..6a1abf3 100644 --- a/python-tornado/migration.md +++ b/python-tornado/migration.md @@ -7,10 +7,10 @@ ``` # Pre 3.5: -from Pubnub import Pubnub +from pubnub import Pubnub # New in 3.5+ -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub ``` diff --git a/python-tornado/tests/benchmark.py b/python-tornado/tests/benchmark.py index 748fe3b..6023017 100644 --- a/python-tornado/tests/benchmark.py +++ b/python-tornado/tests/benchmark.py @@ -12,7 +12,7 @@ import sys import datetime import tornado -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-tornado/tests/delivery.py b/python-tornado/tests/delivery.py index 0181403..21486da 100644 --- a/python-tornado/tests/delivery.py +++ b/python-tornado/tests/delivery.py @@ -14,7 +14,7 @@ import datetime import time import math -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub ## ----------------------------------------------------------------------- ## Configuration diff --git a/python-tornado/tests/subscribe-test.py b/python-tornado/tests/subscribe-test.py index bcbbc7e..7b57415 100755 --- a/python-tornado/tests/subscribe-test.py +++ b/python-tornado/tests/subscribe-test.py @@ -11,7 +11,7 @@ import sys import datetime -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub from functools import partial from threading import current_thread import threading diff --git a/python-tornado/tests/test_grant_async.py b/python-tornado/tests/test_grant_async.py index b51b275..c03cf08 100644 --- a/python-tornado/tests/test_grant_async.py +++ b/python-tornado/tests/test_grant_async.py @@ -1,6 +1,6 @@ -from Pubnub import PubnubTornado as Pubnub +from pubnub import PubnubTornado as Pubnub import time pubnub = Pubnub("demo","demo") diff --git a/python-tornado/tests/test_publish_async.py b/python-tornado/tests/test_publish_async.py index 391297d..1f442ed 100644 --- a/python-tornado/tests/test_publish_async.py +++ b/python-tornado/tests/test_publish_async.py @@ -1,6 +1,6 @@ -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub import time pubnub = Pubnub("demo","demo") diff --git a/python-twisted/README.md b/python-twisted/README.md index c74fb0d..0677eff 100644 --- a/python-twisted/README.md +++ b/python-twisted/README.md @@ -12,7 +12,7 @@ pubnub.start() #### Import ``` -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub ``` #### Init diff --git a/python-twisted/examples/audit.py b/python-twisted/examples/audit.py index b99a8a9..d5cd34b 100644 --- a/python-twisted/examples/audit.py +++ b/python-twisted/examples/audit.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python-twisted/examples/echo-client.py b/python-twisted/examples/echo-client.py index 6f6d1c7..f329d47 100644 --- a/python-twisted/examples/echo-client.py +++ b/python-twisted/examples/echo-client.py @@ -8,7 +8,7 @@ ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Import Libs ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Configuration diff --git a/python-twisted/examples/echo-server.py b/python-twisted/examples/echo-server.py index 65f9c57..06ee81a 100644 --- a/python-twisted/examples/echo-server.py +++ b/python-twisted/examples/echo-server.py @@ -8,7 +8,7 @@ ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Import Libs ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Configuration diff --git a/python-twisted/examples/grant.py b/python-twisted/examples/grant.py index 053c1f9..3d6284f 100644 --- a/python-twisted/examples/grant.py +++ b/python-twisted/examples/grant.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python-twisted/examples/here-now.py b/python-twisted/examples/here-now.py index 38b79f8..acf8cb0 100644 --- a/python-twisted/examples/here-now.py +++ b/python-twisted/examples/here-now.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-twisted/examples/history.py b/python-twisted/examples/history.py index 81974ec..d8c4063 100644 --- a/python-twisted/examples/history.py +++ b/python-twisted/examples/history.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-twisted/examples/publish.py b/python-twisted/examples/publish.py index 13b5357..a687c59 100644 --- a/python-twisted/examples/publish.py +++ b/python-twisted/examples/publish.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-twisted/examples/revoke.py b/python-twisted/examples/revoke.py index fab0497..3b87015 100644 --- a/python-twisted/examples/revoke.py +++ b/python-twisted/examples/revoke.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python-twisted/examples/subscribe.py b/python-twisted/examples/subscribe.py index 9c73439..1704f7c 100644 --- a/python-twisted/examples/subscribe.py +++ b/python-twisted/examples/subscribe.py @@ -7,7 +7,7 @@ import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-twisted/examples/subscribe_group.py b/python-twisted/examples/subscribe_group.py index 67dbac5..2bfd40a 100644 --- a/python-twisted/examples/subscribe_group.py +++ b/python-twisted/examples/subscribe_group.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-twisted/migration.md b/python-twisted/migration.md index 49de5a9..924fa7c 100644 --- a/python-twisted/migration.md +++ b/python-twisted/migration.md @@ -7,10 +7,10 @@ ``` # Pre 3.5: -from Pubnub import Pubnub +from pubnub import Pubnub # New in 3.5+ -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub ``` diff --git a/python-twisted/tests/benchmark.py b/python-twisted/tests/benchmark.py index b6477c0..1d5f914 100644 --- a/python-twisted/tests/benchmark.py +++ b/python-twisted/tests/benchmark.py @@ -12,7 +12,7 @@ import sys import datetime from twisted.internet import reactor -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python-twisted/tests/delivery.py b/python-twisted/tests/delivery.py index 30ce55f..46690f8 100644 --- a/python-twisted/tests/delivery.py +++ b/python-twisted/tests/delivery.py @@ -14,7 +14,7 @@ import datetime import time import math -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub ## ----------------------------------------------------------------------- ## Configuration diff --git a/python-twisted/tests/subscribe-test.py b/python-twisted/tests/subscribe-test.py index ba74992..2f4c208 100755 --- a/python-twisted/tests/subscribe-test.py +++ b/python-twisted/tests/subscribe-test.py @@ -11,7 +11,7 @@ import sys import datetime -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub from functools import partial from threading import current_thread import threading diff --git a/python-twisted/tests/test_grant_async.py b/python-twisted/tests/test_grant_async.py index 5b33b11..0f79570 100644 --- a/python-twisted/tests/test_grant_async.py +++ b/python-twisted/tests/test_grant_async.py @@ -1,6 +1,6 @@ -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub import time pubnub = Pubnub("demo","demo") diff --git a/python-twisted/tests/test_publish_async.py b/python-twisted/tests/test_publish_async.py index 391297d..1f442ed 100644 --- a/python-twisted/tests/test_publish_async.py +++ b/python-twisted/tests/test_publish_async.py @@ -1,6 +1,6 @@ -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub import time pubnub = Pubnub("demo","demo") diff --git a/python-twisted/tests/unit-test-full.py b/python-twisted/tests/unit-test-full.py index 3aecf12..2335ef6 100644 --- a/python-twisted/tests/unit-test-full.py +++ b/python-twisted/tests/unit-test-full.py @@ -18,7 +18,7 @@ ## ----------------------------------- import sys -from Pubnub import PubnubTwisted as Pubnub +from pubnub import PubnubTwisted as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python/examples/audit.py b/python/examples/audit.py index ebf31af..c53c2bd 100644 --- a/python/examples/audit.py +++ b/python/examples/audit.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python/examples/console.py b/python/examples/console.py index bfa4486..a1915ed 100644 --- a/python/examples/console.py +++ b/python/examples/console.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub import threading from datetime import datetime diff --git a/python/examples/cr.py b/python/examples/cr.py index c537780..f63e6d2 100644 --- a/python/examples/cr.py +++ b/python/examples/cr.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python/examples/dev-console.py b/python/examples/dev-console.py index 134d2e7..8527307 100755 --- a/python/examples/dev-console.py +++ b/python/examples/dev-console.py @@ -6,7 +6,7 @@ ## http://www.pubnub.com/ import sys -from Pubnub import Pubnub +from pubnub import Pubnub from optparse import OptionParser diff --git a/python/examples/grant.py b/python/examples/grant.py index af9352e..b0832e4 100644 --- a/python/examples/grant.py +++ b/python/examples/grant.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python/examples/here-now.py b/python/examples/here-now.py index 9640cc5..4c2dc4c 100644 --- a/python/examples/here-now.py +++ b/python/examples/here-now.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python/examples/history.py b/python/examples/history.py index 603a0f8..5b92828 100644 --- a/python/examples/history.py +++ b/python/examples/history.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python/examples/presence.py b/python/examples/presence.py index ab91321..7d9af3b 100644 --- a/python/examples/presence.py +++ b/python/examples/presence.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python/examples/publish.py b/python/examples/publish.py index 594e7c4..3bc5e8f 100644 --- a/python/examples/publish.py +++ b/python/examples/publish.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' @@ -19,7 +19,7 @@ ssl_on = len(sys.argv) > 5 and bool(sys.argv[5]) or False ## Initiate Pubnub State ## ----------------------------------------------------------------------- pubnub = Pubnub(publish_key=publish_key, subscribe_key=subscribe_key, - secret_key=secret_key, cipher_key=cipher_key, ssl_on=ssl_on) + secret_key=secret_key, cipher_key=cipher_key, ssl_on=ssl_on, pooling=False) channel = 'hello_world' message = 'Hello World !!!' diff --git a/python/examples/pubnub-console/pubnub-console b/python/examples/pubnub-console/pubnub-console index bfa4486..a1915ed 100644 --- a/python/examples/pubnub-console/pubnub-console +++ b/python/examples/pubnub-console/pubnub-console @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub import threading from datetime import datetime diff --git a/python/examples/revoke.py b/python/examples/revoke.py index 437e5b5..9bee010 100644 --- a/python/examples/revoke.py +++ b/python/examples/revoke.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'pam' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'pam' diff --git a/python/examples/subscribe.py b/python/examples/subscribe.py index 9b8b223..489c7c1 100644 --- a/python/examples/subscribe.py +++ b/python/examples/subscribe.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub +from pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' @@ -19,7 +19,7 @@ ssl_on = len(sys.argv) > 5 and bool(sys.argv[5]) or False ## Initiate Pubnub State ## ----------------------------------------------------------------------- pubnub = Pubnub(publish_key=publish_key, subscribe_key=subscribe_key, - secret_key=secret_key, cipher_key=cipher_key, ssl_on=ssl_on) + secret_key=secret_key, cipher_key=cipher_key, ssl_on=ssl_on, daemon=True) channel = 'a' @@ -45,5 +45,8 @@ def disconnect(message): print("DISCONNECTED") -pubnub.subscribe(channel, callback=callback, error=callback, +pubnub.subscribe(channels=channel, callback=callback, error=callback, connect=connect, reconnect=reconnect, disconnect=disconnect) +import time +while True: + time.sleep(10) diff --git a/python/examples/subscribe_group.py b/python/examples/subscribe_group.py index ee8e190..c6dcf67 100644 --- a/python/examples/subscribe_group.py +++ b/python/examples/subscribe_group.py @@ -7,7 +7,7 @@ import sys -from Pubnub import Pubnub as Pubnub +from pubnub import Pubnub as Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' subscribe_key = len(sys.argv) > 2 and sys.argv[2] or 'demo' diff --git a/python/tests/subscribe-test.py b/python/tests/subscribe-test.py index a1b1826..7a4b723 100755 --- a/python/tests/subscribe-test.py +++ b/python/tests/subscribe-test.py @@ -11,7 +11,7 @@ import sys import datetime -from Pubnub import PubnubAsync as Pubnub +from pubnub import PubnubAsync as Pubnub from functools import partial from threading import current_thread import threading diff --git a/python/tests/test_cg.py b/python/tests/test_cg.py index a823e44..f4a1080 100644 --- a/python/tests/test_cg.py +++ b/python/tests/test_cg.py @@ -1,4 +1,4 @@ -from Pubnub import Pubnub +from pubnub import Pubnub import time import random diff --git a/python/tests/test_grant.py b/python/tests/test_grant.py index 9ecafdf..57f0b14 100644 --- a/python/tests/test_grant.py +++ b/python/tests/test_grant.py @@ -1,6 +1,6 @@ -from Pubnub import Pubnub +from pubnub import Pubnub import time pubnub = Pubnub("demo","demo") diff --git a/python/tests/test_grant_async.py b/python/tests/test_grant_async.py index 4d38a0a..07c8a2c 100644 --- a/python/tests/test_grant_async.py +++ b/python/tests/test_grant_async.py @@ -1,6 +1,6 @@ -from Pubnub import Pubnub +from pubnub import Pubnub import time pubnub = Pubnub("demo","demo") diff --git a/python/tests/test_publish_async.py b/python/tests/test_publish_async.py index 7270727..cf0811e 100644 --- a/python/tests/test_publish_async.py +++ b/python/tests/test_publish_async.py @@ -1,6 +1,6 @@ -from Pubnub import Pubnub +from pubnub import Pubnub import time pubnub = Pubnub("demo","demo") |
