3

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"}
3
  • Did you try using like this $cmdOutput = python .\test.py Commented Jul 11, 2016 at 20:39
  • This is assunming that your python environment varibale are all set ? Commented Jul 11, 2016 at 20:40
  • Sorry I am very new to powershell. $outputBox.text = python .\test.py worked thank you! Commented Jul 11, 2016 at 20:48

1 Answer 1

3
$outputBox.text = python .\test.py
Sign up to request clarification or add additional context in comments.

1 Comment

if you are satisfied with answer please mark the answer as correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.