python - IPython没有子进程

标签 python subprocess jupyter-notebook turtle-graphics

我是 IPython 新手,但我在 IDLE 中编写了很多程序。在 Windows 中使用 Python“turtle”模块,turtle 图形窗口会卡住,直到您以“无子进程”启动它。这只是在快捷方式中添加“-n”的问题。如何在 IPython 笔记本中执行此操作?现在又结冰了。

我正在使用 WinPython。我还没有在 IPython 中找到任何关于此问题的在线引用。提前致谢!

最佳答案

如果您从普通的 ipython 控制台使用 turtle 模块,那么它应该可以正常工作(相同的单个 python 进程)。

ipython Notebook 没有“无子进程”选项 - Web 浏览器不执行 Python 代码(默认情况下),因此 ipython Notebook 使用服务器 Python 进程来运行Python代码。

要在浏览器中执行 Python 代码,您可以使用 Skulpt例如,How to Think Like a Computer Scientist Learning with Python: Interactive Edition 2.0 。 Skulpt 支持 turtle 模块。

关于python - IPython没有子进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26476454/

相关文章:

python - 更改 3D 图形颜色 (matplotlib)

python - 从python中的kibana查询?

python - Jupyter笔记本找不到模块

python - 在 Azure Notebook VM 中找不到名为 'azure.datalake' 或 pip 的模块

python - tkinter - move 形状

python - 将 MxN 二维数据点数组重新组织为 N 维数组

python - 使用python读取php文件的输出

python - 子进程通信 : order matters?

在 Windows 上检查子进程的退出状态

amazon-web-services - 升级 aws-glue-sessions 后出现 set_glue_version 异常