Russell
Russell

Reputation: 189

How do I use output from python script in my Powershell application?

I have a power-shell GUI Application. Inside my application I call a python script. I want to display the output of the python script.

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"}

Upvotes: 3

Views: 5433

Answers (1)

Russell
Russell

Reputation: 189

$outputBox.text = python .\test.py

Upvotes: 3

Related Questions