0

一个kombu的例子:

#!/usr/bin/env python3
from __future__ import with_statement

from kombu import BrokerConnection

with BrokerConnection("amqp://guest:guest@localhost:5672//") as conn:
    with conn.SimpleQueue("kombu_demo") as queue:
        queue.put({"hello": "world"}, serializer="json", compression="zlib")

它在控制台工作,但在eclipse+pydev中不能工作,问题是找不到BrokerConnection,我在kombu src中找到'BrokerConnection = Connection',kombu有一个名为Connection的类,想给它一个别名BrokerConnection,但是ecrilpse+pydev 不能很好地处理这个问题,如何解决这个问题?

4

0 回答 0