import pymqi
queue_manager = 'QUEUE_MANAGER_NAME'
channel = 'SVRCONN.1'
host = 'host.domain.com'
port = '1434'
conn_info = '%s(%s)' % (host, port)
qmgr = pymqi.QueueManager(None)
qmgr.connectTCPClient(queue_manager, pymqi.cd(), channel, conn_info)
How to connect to local MQseries queue using Python?