假设我有一个for循环,每次迭代只需要很短的时间,并且我希望在每次迭代中更新一个破折号: for i, (idx, row) in enumerate(df.iterrows()): updatevector app.callback(Output('my-plot', 'figure'), [Input('vector')]) 我在网上浏览过,但似乎没有办法在dash中做到这一点。我唯一的解决方案是使用Interval组件,
使用paho mqtt,在函数中声明全局变量,但是当需要调用函数外部的变量时,它就不能工作。( on_message函数之外的最后一行打印函数)。它每1秒发布一次消息,但在执行时没有显示任何消息。import paho.mqtt.client as mqttdef on_connect (client, us