是否可以从lldb会话显示图形

是否可以从lldb会话显示图形

本文介绍了LLDB:是否可以从lldb会话显示图形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示LLDB会话中的图,这可能吗?

I would like to display a plot from LLDB session, is that possible?

plt.figure()
plt.title('Test')
plt.imshow(array, cmap='gray')
plt.show()

现在,当我通过命令脚本导入〜/script.py"执行此操作时;会话卡住了!

Right now, when i do that through the "command script import ~/script.py"; the session is stuck!

推荐答案

这在命令行lldb中正常工作(或者至少对我有用...)

This works correctly in command-line lldb (or at least it does for me...)

当尝试使用Xcode共享到Window Server的连接时它不起作用(因为lldb在Xcode应用程序进程中运行)并不完全令人惊讶.做plt.figure()似乎停滞了,尽管我现在还不清楚我在调用该方法时Python认为它在做什么.它没有停滞在明显的地方.

That it doesn't work when trying to share the connection to the Window Server with Xcode (since lldb is running in the Xcode app process) is not entirely surprising. Doing plt.figure() seems to stall, though it wasn't immediately clear to me what Python thought it was doing when you called this method. It was not stalled somewhere obvious.

我不认为lldb与这一种或另一种方式有任何关系(特别是因为命令行lldb可以工作.)您更有可能通过询问MatPlotLib人员是否想出办法来使其工作当python是嵌入式解释器时,尤其是在像Xcode这样的复杂代码中,有任何共享GUI的经验.

I don't think lldb has anything to do with this one way or the other (especially since command-line lldb works.) You're more likely to figure out how to get this working by asking the MatPlotLib folks if they have any experience sharing GUI's when the python is an embedded interpreter, especially in something complex like Xcode.

您可能还会看到他们是否有任何方法可以调出进程外渲染器.这可能会解决Xcode内部生活的复杂性.

You might also see if they have any way to call out to an out-of-process renderer. That might get around the complexities of living inside Xcode.

这篇关于LLDB:是否可以从lldb会话显示图形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 03:25