python - 无 IDLE 子进程连接

标签 python macos subprocess

我是 python 编程的新手,想尝试在 IDLE 而不是 OSX 命令行中编辑脚本。但是,当我尝试启动它时,出现错误“空闲子进程未建立连接。空闲无法启动子进程或个人防火墙软件正在阻止连接。”我没有配置防火墙,那可能是什么问题?

最佳答案

您可以尝试使用“-n”选项运行 IDLE。来自 IDLE 帮助:

Running without a subprocess:

    If IDLE is started with the -n command line switch it will run in a
    single process and will not create the subprocess which runs the RPC
    Python execution server.  This can be useful if Python cannot create
    the subprocess or the RPC socket interface on your platform.  However,
    in this mode user code is not isolated from IDLE itself.  Also, the
    environment is not restarted when Run/Run Module (F5) is selected.  If
    your code has been modified, you must reload() the affected modules and
    re-import any specific items (e.g. from foo import baz) if the changes
    are to take effect.  For these reasons, it is preferable to run IDLE
    with the default subprocess if at all possible.

关于python - 无 IDLE 子进程连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3277946/

相关文章:

swift - 使用 NSCollectionView 时断言失败

c - 在 Linux 设备和 Mac 之间共享文件的情况下,mac os x lion 中的 fwrite() 和 fread() 需要很长时间

python - 需要通过用户输入(GPIO.input)结束子进程的循环

python - 简单的 Python 脚本无法正确执行

python - 将具有开始的行 - 结束转换为具有 TimeIndex 的数据帧的性能问题

linux - 批量重命名 URL 编码的文件名和文件夹路径

python - 在 google app engine 上使用 python [xmlrpc frontend] 模块连接到 WordPress 博客

python - 如何在子进程 Popen 中引用工作区中的文件?

python - 从不同文件导入变量的正确方法是什么?

python - 如何使用Elasticsearch在Django中从前端编辑/删除数据?