From ab0edc0c53f72b0f9dbd2d7d34d74cc4168c0744 Mon Sep 17 00:00:00 2001 From: "Darryl L. Pierce" Date: Wed, 18 Sep 2013 21:15:16 +0000 Subject: QPID-4924: Fixed the Python examples to use the new Python module Now the imports will first attempt to bring in qpid_messaging, the Swig generated Python. If that fails it will then fall back to trying to import qpid.messaging, the pure Python binding. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1524572 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/examples/api/spout | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'qpid/python/examples/api/spout') diff --git a/qpid/python/examples/api/spout b/qpid/python/examples/api/spout index 6584b853fc..48921d4387 100755 --- a/qpid/python/examples/api/spout +++ b/qpid/python/examples/api/spout @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -19,7 +19,13 @@ # import optparse, time -from qpid.messaging import * + +try: + from qpid_messaging import * + from uuid import uuid4 +except: + from qpid.messaging import * + from qpid.util import URL from qpid.log import enable, DEBUG, WARN -- cgit v1.2.1