Ask Your Question

Revision history [back]

If you use the stdout command you can put the output to any other file format, not just .out:

sys.stdout = open('P:\Documents\Python\FileName.csv', 'w')  # puts to .csv for example instead of writing to the console
ierr = psspy.output_y_matrix(sid, all, ties, out)
sys.stdout = sys.__stdout__  # puts writing back to console

Of course out = 1 in this case.