summaryrefslogtreecommitdiff
path: root/python/hello-world
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-01-16 05:28:25 +0000
committerRafael H. Schloming <rhs@apache.org>2007-01-16 05:28:25 +0000
commit8021505b531ba4c022ab89f8a2bd59bf8af3c1fc (patch)
tree7165613b0996b55b466e140accdf6f81bae33b4c /python/hello-world
parentd24ea0b5a3f4ca7c1a7f30f9af99b4e7338a1d85 (diff)
downloadqpid-python-8021505b531ba4c022ab89f8a2bd59bf8af3c1fc.tar.gz
0-9 request/response framing for python
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@496593 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/hello-world')
-rwxr-xr-xpython/hello-world11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/hello-world b/python/hello-world
new file mode 100755
index 0000000000..b05873dff3
--- /dev/null
+++ b/python/hello-world
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+import qpid
+from qpid.client import Client
+from qpid.content import Content
+
+client = Client("127.0.0.1", 5672, qpid.spec.load("../specs/amqp.0-9.xml"))
+client.start({"LOGIN": "guest", "PASSWORD": "guest"})
+ch = client.channel(1)
+ch.channel_open()
+ch.message_transfer(destination="amq.direct", routing_key="asdf",
+ body="hello world")