Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You're not far off. You just need to redirect the report output to a file. This is because the zone_2() function doesn't return the text of the report, it returns an error code.

# Redirect generated reports to a file
psspy.report_output(islct=2, filarg="./testfile3.txt", options=[0])
# Run any functions that create a report
psspy.zsys(0,4,[22,30,31,32])
psspy.zone_2(0,0,1)
# Redirect reports back to the default
psspy.report_output(islct=2, options=[0])