From 2b1f0e248873a041f7fe5bda724a0d7e13617372 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 8 Feb 2008 15:01:30 +0000 Subject: Refactored verify scripts, added verify for python Examples. To verify an example: /bin/verify See comments in bin/verify for more details. Changes: - Each example dir has its own verify script and verify.in. - Added sys.stdout.flush() to som python examples so verify can tell when they're ready. - Made python examples svn:executable. - C++ examples/Makefile.am runs python examples git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@619903 13f79535-47bb-0310-9956-ffa450edef68 --- python/examples/pubsub/topic_subscriber.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 python/examples/pubsub/topic_subscriber.py (limited to 'python/examples/pubsub/topic_subscriber.py') diff --git a/python/examples/pubsub/topic_subscriber.py b/python/examples/pubsub/topic_subscriber.py old mode 100644 new mode 100755 index 52ec67b77c..a5c05ba177 --- a/python/examples/pubsub/topic_subscriber.py +++ b/python/examples/pubsub/topic_subscriber.py @@ -7,7 +7,7 @@ """ import base64 - +import sys import qpid from qpid.client import Client from qpid.content import Content @@ -60,8 +60,8 @@ def dump_queue(client, queue_name): # Set parameters for login -host="127.0.0.1" -port=5672 +host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1" +port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672 amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml" user="guest" password="guest" @@ -108,7 +108,8 @@ session.queue_bind(exchange="amq.topic", queue=europe, routing_key="control") # Remind the user to start the topic producer -print "Queues create - please start the topic producer" +print "Queues created - please start the topic producer" +sys.stdout.flush() # Call dump_queue to print messages from each queue -- cgit v1.2.1