我遇到了一个奇怪的情况,这让我觉得我在某个时候出错了。你知道吗
环境:我正在Windows10上运行powershell.ps1脚本(尝试了powershell和ISE)。在这个脚本中,我运行的是python(2.7.14)脚本。你知道吗
问题是我看不到这个python脚本的任何输出。这让我很烦恼,因为我看不到密码提示(https://docs.python.org/2/library/getpass.html内部使用),也无法输入密码。你知道吗
至少尝试了以下脚本调用方法($python=“C:\Python27\u x86\python.exe“”:
. $python ...
& "$python ..."
Start-Process $python ...
cmd /c "$python ..."
(如PowerShell is Buffering Python Stdout所示)有什么想法吗?这种行为的原因是什么?如何将密码传递给脚本?你知道吗
一定有比这更好的方法,例如:Powershell: Capture program stdout and stderr to separate variables
目前没有回答
相关问题 更多 >
编程相关推荐