First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
From rev 34 it is not needed to set the path. Just do import psse34, see below:
import sys,os
ver = 34
if ver == 33:
strPssePath = '' # path to PSSE program executable
if os.path.exists(r'C:\Program Files (x86)\PTI\PSSE33'): # 32-bit applications
strPssePath = r'C:\Program Files (x86)\PTI\PSSE33'
elif os.path.exists(r'C:\Program Files\PTI\PSSE33'): # 64-bit applications
strPssePath = r'C:\Program Files\PTI\PSSE33'
sys.path.append(os.path.join(strPssePath, 'PSSBIN'))
sys.path.append(os.path.join(strPssePath, 'PSSLIB'))
os.environ['PATH'] += ';' + os.path.join(strPssePath, 'PSSBIN')
os.environ['PATH'] += ';' + os.path.join(strPssePath, 'PSSLIB')
elif ver == 34:
import psse34
import psspy
import redirect
redirect.psse2py()
psspy.psseinit(150000)
print psspy.psseversion()