First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hi there,
The problem is due to that psspy.pyc is no longer in the same folder as the psse.exe, which is case for older versions.
To import the psspy module of PSSE Xplore 34, you should specify the two paths separately for sys.path and os.environ['PATH']. The following codes work if you installed your PSSE Xplore 34 in the default folder.
import os
import sys
sys_path_PSSE=r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27' #or where else you find the psspy.pyc
sys.path.append(sys_path_PSSE)
os_path_PSSE=r' C:\Program Files (x86)\PTI\PSSEXplore34 \PSSBIN' # or where else you find the psse.exe
os.environ['PATH'] += ';' + env_path_PSSE
import psspy
2 | No.2 Revision |
Hi there,
The problem is due to that psspy.pyc is no longer in the same folder as the psse.exe, which is case for older versions.
To import the psspy module of PSSE Xplore 34, you should specify the two paths separately for sys.path and os.environ['PATH']. The following codes work if you installed your PSSE Xplore 34 in the default folder.
import os
import sys
sys_path_PSSE=r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27' #or where else you find the psspy.pyc
sys.path.append(sys_path_PSSE)
os_path_PSSE=r' C:\Program Files (x86)\PTI\PSSEXplore34 \PSSBIN' (x86)\PTI\PSSEXplore34\PSSBIN' # or where else you find the psse.exe
os.environ['PATH'] += ';' + env_path_PSSE
import psspy