在 Visual Studio 中运行 Python 工具的错误消息
我是Python新手,今天才开始学习。
我已经安装了 Visual Studio 2010 的 Python 工具并使用 VS 作为编辑器。
我的测试 python 程序运行正确,但在输出窗口的最后一行我看到以下内容
The thread 'Python Thread' (0x6f4) has exited with code 0 (0x0).
请告诉我这个错误的含义以及如何解决它。提前谢谢大家!
编辑:此外,每当我尝试按 F5(开始调试)运行程序时,它都会打开一个名为 c:\Program Files\Python32\python.exe 的命令窗口,它似乎是从其位置调用主 python 文件。是否应该打开该命令窗口一秒钟?我怀疑该命令窗口是否是有问题的“Python 线程”。
Edit_2:
对于所有未来的新浏览器或 python:
如果您使用 Visual Studios 的 Python 工具,您可能需要使用 Shift+Alt+F5 而不仅仅是 F5 来构建程序。这将在 VS 内的 Python 交互窗口中输出,并且不会显示烦人的命令窗口弹出窗口。
I am new to python and just started learning it today.
I have installed Python Tools for Visual Studio 2010 and using VS as my Editor.
My test python programs run correctly but the at the last line in the output window I see the following
The thread 'Python Thread' (0x6f4) has exited with code 0 (0x0).
Please advice me what this error means and how can I resolve it. Thanks a bunch in advance!
Edit: Also, whenever I try to run my program by pressing F5 (Start Debugging), it opens up a command window titled c:\Program Files\Python32\python.exe, it seems to be calling the main python file from its location. Is it supposed to open up that command window for a second? I suspect if that command window is the "Python Thread" in question.
Edit_2:
For all the future new explorers or python:
If you are using Python Tools for Visual Studios, you might want to build your program with Shift+Alt+F5 instead of just F5. This will output in Python interactive window inside VS and it will not display annoying command window popup.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这意味着脚本执行成功。如果代码不是零,则表明存在错误。
是的,该命令窗口很可能是“Python 线程”。
That means the script executed successfully. If the code was anything other than zero, that would indicate an error.
Yes, that command window is likely the "Python Thread".