<div dir="ltr">Hello,<div><br></div><div>I'm trying to build as a data consumer a python script with both</div><div>pika (RabbitMQ) and PyQtGraph</div><div><br></div><div>Unfortunately I get a frozen PyQtGraph window</div><div><br></div><div>My script contains this main function</div><div><br><div><div>def main(args):</div><div>    #QtGui.QApplication.setGraphicsSystem('raster')</div><div>    app = QtGui.QApplication([])</div><div>    #mw = QtGui.QMainWindow()</div><div>    #mw.resize(800,800)</div><div><br></div><div>    pg.setConfigOption('background', 'w')</div><div>    pg.setConfigOption('foreground', 'k')</div><div><br></div><div>    win = pg.GraphicsWindow(title="Basic plotting examples")</div><div>    win.resize(1000,600)</div><div>    win.setWindowTitle('plot')</div><div><br></div><div>    # Enable antialiasing for prettier plots</div><div>    pg.setConfigOptions(antialias=True)</div><div>    </div><div>    order_book_plot = OrderBookPlot(args, win)</div><div>    </div><div>    import sys</div><div>    ## Start Qt event loop unless running in interactive mode or using pyside.</div><div>    if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):</div><div>        QtGui.QApplication.instance().exec_()</div></div></div><div><br></div><div>and also this class</div><div><br></div><div>class ...:</div><div>    ....</div><div><div>    def init_rabbitmq_connection(self):</div><div>        connection = pika.BlockingConnection(pika.ConnectionParameters(<br></div><div>            host='localhost'))</div><div>        channel = connection.channel()</div><div><br></div><div>        exchange = 'topic_logs'</div><div><br></div><div>        channel.exchange_declare(exchange=exchange,</div><div>                         type='topic')</div><div><br></div><div>        result = channel.queue_declare(exclusive=True)</div><div>        queue_name = result.method.queue</div><div><br></div><div>        binding_keys = self.args.binding_keys.split(',')</div><div><br></div><div>        for binding_key in binding_keys:</div><div>            channel.queue_bind(exchange=exchange,</div><div>                       queue=queue_name,</div><div>                       routing_key=binding_key)</div><div><br></div><div>        logging.info(' [*] Waiting for data. To exit press CTRL+C')</div><div><br></div><div><br></div><div>        channel.basic_consume(self.rabbitmq_data_callback,</div><div>                      queue=queue_name,</div><div>                      no_ack=True)</div><div><br></div><div>        channel.start_consuming()</div></div><div><br></div><div><br></div><div>maybe you noticed Qt have an event loop</div><div><br></div><div>and I think it's doing odd things with pika.BlockingConnection</div><div><br></div><div><br></div><div><font face="arial, sans-serif">Any help is welcome.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Femto</font></div></div>