Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I've been using psspy.read() to open raw files. I'm not sure if there's any tricks to make it work with an older version, here's the code I've been using to open either a .raw or .sav file:

ext = os.path.splitext(inCase)[1]
if ext == '.raw':
    ierr = psspy.read(0, inCase)
else:
    ierr = psspy.case(inCase)

if ierr:
    print "Something went wrong when i tried to load %s" % inCase
    return ierr
click to hide/show revision 2
Added info about the readrawversion function.

To read in an older version of PSSE's raw file use the readrawversion function:

psspy.readrawversion(numnam=0, # treat bus numbers as unique
                     vernum='29', # read in version 29.
                     ifile=r'c:\documents\version_29_study.raw')

I've been using psspy.read() to open raw files. I'm not sure if there's any tricks to make it work with an older version, here's the code I've been using to open either a .raw or .sav file:

ext = os.path.splitext(inCase)[1]
if ext == '.raw':
    ierr = psspy.read(0, inCase)
else:
    ierr = psspy.case(inCase)

if ierr:
    print "Something went wrong when i tried to load %s" % inCase
    return ierr