aboutsummaryrefslogtreecommitdiffstats
path: root/python/examples
diff options
context:
space:
mode:
authorDevendra2014-04-22 23:56:29 +0530
committerDevendra2014-04-22 23:56:29 +0530
commitf1ce4ae3179d51e88aca266d107531209d2d98a2 (patch)
treeba18cd91993d3544881b429a43f0338e6a96360c /python/examples
parent4926061ebebbc060d14feac9c9d6b13880205724 (diff)
downloadpubnub-python-f1ce4ae3179d51e88aca266d107531209d2d98a2.tar.bz2
dev console improvements
Diffstat (limited to 'python/examples')
-rwxr-xr-xpython/examples/dev-console.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/python/examples/dev-console.py b/python/examples/dev-console.py
index 532edbe..52ed910 100755
--- a/python/examples/dev-console.py
+++ b/python/examples/dev-console.py
@@ -53,7 +53,7 @@ parser.add_option("--uuid",
(options, args) = parser.parse_args()
-print options
+print(options)
pubnub = Pubnub(options.publish_key, options.subscribe_key, options.secret_key, options.cipher_key, options.auth_key, options.ssl, options.origin, options.uuid)
@@ -88,7 +88,10 @@ def print_error(msg, channel=None):
def get_input(message, t=None):
while True:
try:
- command = raw_input(message)
+ try:
+ command = raw_input(message)
+ except NameError:
+ command = input(message)
if t is not None and t == bool:
if command in ["True", "true", "1", 1, "y", "Y", "yes", "Yes", "YES"]:
return True
@@ -218,8 +221,11 @@ def kill_all_threads():
if thread.isAlive():
try:
thread._Thread__stop()
- except:
- print(str(thread.getName()) + ' could not be terminated')
+ except Exception as e:
+ pass
+ #print(e)
+ #thread.exit()
+ #print(str(thread.getName()) + ' could not be terminated')
commands = []