我正在编写一个脚本,该脚本可以在 Ubuntu 14.04 中的普通 bash shell 中正常运行。但是,当它从 PyCharm 中运行时,我得到:
termios.error: (25, 'Inappropriate ioctl for device')
只需要这段代码:
from prompt_toolkit import prompt
text = prompt('Give me some input: ')
print('You said: %s' % text)
来自 Python 提示工具包 https://github.com/jonathanslenders/python-prompt-toolkit 中的“入门”示例这是 python 3.4 虚拟环境中唯一安装的包。
由于这是 PyCharm 中集成调试器的运行方式,我该如何修复它以便调试器正常运行?
最佳答案
您可以将 Pycharm 调试器附加到在 Pycharm 之外执行的进程。
转到工具 -> 附加到进程并选择正确的进程。 See Pycharm docs
关于shell - 我在 PyCharm 中得到 'Inappropriate ioctl for device',但不是正常的 shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34368532/