Try to use python to call psse. but something wrong with importing dyntools.
from __future__ import division
import os, sys, math, csv, time
PSSPY_location = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'
PSSE_location = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'
sys.path.append(PSSPY_location)
os.environ['PATH'] += ';' + PSSPY_location
os.environ['PATH'] += ';' + PSSE_location
import socket
import struct
import numpy, copy
import initialize_mute as mt # mute all psse outputs
# import psse34
import dyntools
import psspy
import redirect
import dyntools
File ".\dyntools.py", line 51, in <module>
ImportError: No module named pssevrsn
Process finished with exit code 1
The PSSE manual indicates you need to define
PSSPY_locationandPSSE_locationin your script but here is another option to tell Python where your PSSE installation is.Create a file with extension
.pth, (e.g.,__psspy__.pth) in thesite-packagesdirectory of your Python installation. This could likely beC:\Python27\Lib\site-packages\__psspy.pth__for you. The contents of this file will simply beC:\Program Files (x86)\PTI\PSSE34\PSSPY27. Whenever you startup your python interpreter it will looks for paths contained in.pthfiles in this directory and will look for python modules in these locations when you makeimportstatements.Then your script should be the following:
If you still can't import
dyntoolsthen make sure it is where it should be, i.e.,C:\Program Files (x86)\PTI\PSSE34\PSSPY27\dyntools.pycFor PSSE v34 remember to always do
import psse34before importing any other PSSE related python modules.