importing psspy module in a python sript
I use the code
import os,sys
PSSE_LOCATION = r"D:\COMPONENTE_LOGICA\PSSE\PSSE30\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
import psspy
And I get this:
Traceback (most recent call last): File "<console>", line 1, in <module> File ".\psspy.py", line 56, in <module> ImportError: DLL load failed: it is not a valid win32 program
I checkeed the PSSE bin folder and I could not find a psspy.dll. There is a psspyc.pyd. Is the psspy.dll missing? Where can I get one?
The code looks fine (except for a missing underscore in the first mention of "PSSELOCATION"). Are you using Python 2.3? I haven't tried to call PSSE like this prior to v31. Do you have access to a newer version of PSSE?