python 菜单 vs_在python Tools for Visual Studio(PTVS)中调试python代码时,如何抑制控制台窗口?...

这比预期的更难搞清楚,但和往常一样,一旦你知道了就很简单了。

快速回答。

在解决方案资源管理器中,右键单击项目并选择“属性”。在“常规”选项卡上,选中“Windows应用程序”旁边的复选框。

然后保存并关闭“属性”窗口。完成!The typical way to hide the Python console window is to set the

Windows Application property (in the project properties window), which

will then run pythonw.exe instead of python.exe. This is only really

an option if you don't provide any input while your program is running

- the output window in VS is not a console and does not support typing into your program. Also, this option is per-project, so you'll have to

set it for each project. (It also seems to not be working in our

latest builds, so we'll fix that asap...)

The other option is to stop printing output in Visual Studio and only

use the console window. If you are suffering performance issues, this

is more likely to solve the problem. To do this, open

Tools->Options->Python Tools->Advanced and deselect "Tee program

output to Debug Output window". You will probably also want to select

"Wait for input when process exits normally" while you are here. Now

all output will go to the Python console (you can right-click the

title bar and choose Properties to make it bigger), which will be

faster.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值