From c9900041bf70ac76a4eb8753965fe24426ba8cd4 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Wed, 7 Nov 2007 20:46:36 +0000 Subject: added factory for structs, and made default spec loading based on AMQP_SPEC environment variable git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592888 13f79535-47bb-0310-9956-ffa450edef68 --- python/hello-world | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'python/hello-world') diff --git a/python/hello-world b/python/hello-world index 5ba14b0fc1..d419fd988b 100755 --- a/python/hello-world +++ b/python/hello-world @@ -3,8 +3,7 @@ import qpid from qpid.client import Client from qpid.content import Content -spec = qpid.spec.load("../specs/amqp.0-10-preview.xml") -client = Client("127.0.0.1", 5672, spec) +client = Client("127.0.0.1", 5672) client.start({"LOGIN": "guest", "PASSWORD": "guest"}) ch = client.channel(1) ch.session_open() @@ -17,9 +16,7 @@ ch.message_flow("amq.direct", 1, 0xFFFFFFFF) msg = Content("hello world") msg["content_type"] = "text/plain" msg["routing_key"] = "test" -msg["reply_to"] = spec.struct("reply_to") -msg["reply_to"].exchange_name = "asdf" -msg["reply_to"].routing_key = "fdsa" +msg["reply_to"] = client.structs.reply_to("asdf", "fdsa") msg["application_headers"] = {"x": 1, "y": 2, "z": "zee"} ch.message_transfer(destination="amq.direct", content=msg) queue = client.queue("amq.direct") -- cgit v1.2.1