PSSE custom output device with python
How can i make PSSE write its output to file instead of console in python?
Thanks in advance.
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
How can i make PSSE write its output to file instead of console in python?
Thanks in advance.
Method 1: Progress_Output
import psspy
ierr = psspy.progress_output(2,r"C:\Filename.txt", [0, 0])
Method 2: Redirect module (captures all output, not just the progress output)
import psspy, redirect, sys
redirect.psse2py()
old_stdout = sys.stdout # Incase you want to restore output back to the screen
sys.stdout = open(r"C:\Filename.txt", 'w')
It can be helpful to use a contextmanager for method2 when you want to make sure STDOUT always restored to the previous location. http://stackoverflow.com/a/28486632/653689
Asked: 2012-12-06 05:51:47 -0600
Seen: 1,676 times
Last updated: Dec 06 '12
Why psspy.accc_with_dsp_3 function doesn't update .acc solution file?
How to get psse output to Excel?
Can we edit outfiles created by PSSE using any other editor?
How to import a custom Python module in PSSE?
PSSE output not always going to directed output file
Help update data in PSSE by Python 2.7 get data from excel file.
Taking Long to Create DFAX File
CMLDxxU2 and CMLDxxDGU2 modeling
SCMVA values don't match between PSSE GUI and Python API function
whit loves you. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.