1

I use the following code to run the ironpython code in powershell, but the result of the output always shows the GAC information. See the picture enter image description here

[reflection.assembly]::LoadFrom("C:\Program Files\IronPython 2.7\IronPython.dll")
$py = [ironpython.hosting.python]::CreateEngine()
$py.Execute("print 'IronPython Engine loaded.'")

Is there any way to hide it? I don't want to display it every time

1 Answer 1

0

You can just pipe the first command to Out-Null:

[reflection.assembly]::LoadFrom("C:\Program Files\IronPython 2.7\IronPython.dll") | Out-Null

$py = [ironpython.hosting.python]::CreateEngine() 
$py.Execute("print 'IronPython Engine loaded.'")

Which suppresses all output from the command.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.