Printing to main stdout in IPython Notebook from other parallel engines

萝らか妹 提交于 2020-01-05 10:27:18

问题


I am currently working in an IPython Notebook. I am running a function across different engines and would like to see what it prints.

Example:

def simple(a):
    print a+40;
    return a+20

A = range(20);
dview.map_sync(simple, A);

I would like this functionality because I'm running a function that runs for a long time and I am using print statements to keep track of its progress.

来源:https://stackoverflow.com/questions/16430827/printing-to-main-stdout-in-ipython-notebook-from-other-parallel-engines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!