我将PyCharm专业版3.55.0配置为use IPython when possible
在我的运行/调试配置中show interpreter afterwards
我经常使用交互式解释器,我真的很喜欢IPython,但是我不喜欢PyCharm中处理这个问题的方式:我的程序中的任何input()都返回空字符串。
另外,当出现错误时,我无法再与程序交互。(当您运行带有-i标志的Python程序时可以)
控制台中的最后一行与当前行之间有很大的空间
在IPython中,代码块中的...:提示符不缩进2个空格,因此不与In [?]:提示符对齐。在当发生错误时,我会得到这样的结果:Traceback (most recent call last):
File "C:\Program Files (x86)\PyCharm\helpers\pydev\pydev_run_in_console.py", line 69, in
globals = run_file(file, None, None)
File "C:\Program Files (x86)\PyCharm\helpers\pydev\pydev_run_in_console.py", line 29, in run_file
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\PyCharm\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, '