Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在通过Notepad++编译时禁用创建新的python空闲会话?_Python_Shell_Notepad++ - Fatal编程技术网

如何在通过Notepad++编译时禁用创建新的python空闲会话?

如何在通过Notepad++编译时禁用创建新的python空闲会话?,python,shell,notepad++,Python,Shell,Notepad++,当我通过Notepad++编译python时,每次都会有一个新的pythonshell空闲,但我宁愿保留一个固定窗口,而不是另一个位置上的新窗口 例如,当我写一个脚本打印Hello World!并对其进行编译,以便我的Python Shell显示文本,并且在我将脚本修改为再见世界时!同一个shell打印该文本。或者外壳被关闭,但在同一位置,新的外壳与新的文本一起出现 谁能帮帮我我很难弄明白。。 非常感谢 您可能已经注意到,python源代码不需要编译即可运行。Python源代码是由语言引擎动态解

当我通过Notepad++编译python时,每次都会有一个新的pythonshell空闲,但我宁愿保留一个固定窗口,而不是另一个位置上的新窗口

例如,当我写一个脚本打印Hello World!并对其进行编译,以便我的Python Shell显示文本,并且在我将脚本修改为再见世界时!同一个shell打印该文本。或者外壳被关闭,但在同一位置,新的外壳与新的文本一起出现

谁能帮帮我我很难弄明白。。
非常感谢

您可能已经注意到,python源代码不需要编译即可运行。Python源代码是由语言引擎动态解释的

您的问题与记事本++设置和O/S设置有关

IDLE是一个程序,通常在O/S中将其设置为一组文件扩展名.py等的关联应用程序

如果您的记事本++编译没有调用O/S来启动文件,则问题不再存在

运行该文件的正常步骤是,只要在记事本++中保存任何代码修改,就在python终端中重新键入:

>>> execfile( "<<_whatever_filename_my_python_source_has_>>" ) # local DIR
>>> execfile( "C:\\someDIR\\anotherSubDIR\\runMyPYTHON.py" )   # doubled-slashes