Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I recommend you to run python on top of PSS/E. In other words, run the python script without PSS/E.

You can search this topic in this forum.

The basic idea is to add the following lines before your original python script to let it know where your PSS/E library installed.

import sys
import os

PSSE_LOCATION = r'C:\Program Files (x86)\PTI\PSSE33\PSSBIN'
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_LOCATION

import psspy
import pssarrays
from psspy import _i, _f, _c
import redirect
redirect.psse2py()

import pssexcel # now this module can be loaded without error
psspy.psseinit() # this start the pss/e in python

I recommend you to run python on top of PSS/E. In other words, run the python script without PSS/E.

You can search this topic in this forum.

The basic idea is to add the following lines before your original python script to let it know where your PSS/E library installed.

import sys
import os

PSSE_LOCATION = r'C:\Program Files (x86)\PTI\PSSE33\PSSBIN'
(x86)\PTI\PSSE33\PSSBIN' # your location may be different
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_LOCATION

import psspy
import pssarrays
from psspy import _i, _f, _c
import redirect
redirect.psse2py()

import pssexcel # now this module can be loaded without error
psspy.psseinit() # this start the pss/e in python