First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
BTW, PSSe is a 32-bit application so no need for 64-bit installations and V.33 can also use
import psse33
I run python scripts within a DOS window [double-click on a link such "PSS®E 33 Command Prompt", provided by PTI during PSSE installation] and I keep one link for v. 33 and another for v.34 in my working folder. Links can run a bat file as part of their starting process [right-click on the link and select properties, the Target box allows for such bat file entry. Check the link "PSS®E 33 Command Prompt"].
The link for v.33 will run a 'run33.bat' and the one for v.34 will run a 'run34.bat'. Inside each bat file, set right values for psseversion and other variables specific to each version, like pssebinpath or psspypath as needed. By running python scripts within DOS windows for its own version, now the python code just have to check if the environment variable 'psseversion' is 33 or 34 to import the corresponding pssexx module:
psseversion = int(os.environ['PSSEVERSION'])
exec('import psse%s'%psseversion)
import psspy
psspy.psseinit(150000)