gpt4 book ai didi

python - 如何在 Powershell 应用程序中使用 python 脚本的输出?

转载 作者:太空宇宙 更新时间:2023-11-03 16:22:22 25 4
gpt4 key购买 nike

我有一个 power-shell GUI 应用程序。在我的应用程序中,我调用了一个 python 脚本。我想显示 python 脚本的输出。

test.py prints "hello world"

$dog.Add_Click({FixIndefinite}) 
$Form.Controls.Add($dog)


function FixIndefinite {
try { $outputBox.text = "Welcome"
python .\test.py

}
catch {$outputBox.text = "`nOperation could not be completed"}

最佳答案

$outputBox.text = python .\test.py

关于python - 如何在 Powershell 应用程序中使用 python 脚本的输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38315735/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com