PowerShell为什么弹出窗口,如何阻止它 [英] Powershell why popup window, how to stop it
本文介绍了PowerShell为什么弹出窗口,如何阻止它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
pip
或nosetests
之类的Python工具时,会显示一个单独的弹出命令行窗口,执行我的命令,然后消失。这很烦人,因为我几乎看不到可执行输出,尤其是弹出窗口关闭前的最后几行。
我假设我可以更改某些设置以停止弹出窗口?
我在Windows 7中使用的是PowerShell 2.0。
推荐答案
PowerShell不是cmd.exe,它具有不同的控制台界面。更有可能的是,您的py工具正在写入一个不存在的外壳窗口。您可以使用以下语法来解决此问题:
cmd /c script.py
测试脚本
# tester.py, just a test
print "This is a test script, that is all."
输出(PS):
C:srcpython
{powem} [36] --> . ester.py
C:srcpython
{powem} [37] --> cmd /c . ester.py
This is a test script, that is all.
MP
这篇关于PowerShell为什么弹出窗口,如何阻止它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文