Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Need Python Script to Open PSSE v34

I have a python script I've been using to for a few years that would open PSSE and run some analysis for me if I just double clicked the .py script from my virtual desktop. I really liked that I didn't have to open PSSE and then load the python script. This is the code that is in my script that used to work in v33 to open PSSE and get it ready to run my functions:

import os,sys PSSBINPATH = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN" sys.path.append(PSSBINPATH) os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH'] import psspy, redirect, re _i=psspy.getdefaultint() _f=psspy.getdefaultreal() _s=psspy.getdefaultchar() redirect.psse2py() psspy.psseinit(150000) import dyntools import csv

I've tried a number of things I've seen on this forum to get it to open PSSE for me but nothing has worked. I updated the OS path to PSSE34\PSSBIN and I've tried setting the system path to the PSSPY27 and PSSPY37 folders. Neither worked. I have PSSE v34.8 and my PSSE is using python version 2.7.13.

Need Python Script to Open PSSE v34

I have a python script I've been using to for a few years that would open PSSE and run some analysis for me if I just double clicked the .py script from my virtual desktop. I really liked that I didn't have to open PSSE and then load the python script. This is the code that is in my script that used to work in v33 to open PSSE and get it ready to run my functions:

import os,sys os,sys

PSSBINPATH = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN" (x86)\PTI\PSSE33\PSSBIN"

sys.path.append(
PSSBINPATH) PSSBINPATH)

os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH'] os.environ['PATH']

import psspy, redirect, re _i=psspy.getdefaultint() _f=psspy.getdefaultreal() _s=psspy.getdefaultchar() redirect.psse2py() psspy.psseinit(150000) import dyntools re

_i=psspy.getdefaultint()

_f=psspy.getdefaultreal()

_s=psspy.getdefaultchar()

redirect.psse2py()

psspy.psseinit(150000)

import dyntools

import csv

I've tried a number of things I've seen on this forum to get it to open PSSE for me but nothing has worked. I updated the OS path to PSSE34\PSSBIN and I've tried setting the system path to the PSSPY27 and PSSPY37 folders. Neither worked. I have PSSE v34.8 and my PSSE is using python version 2.7.13.

Need Python Script to Open PSSE v34

I have a python script I've been using to for a few years that would open PSSE and run some analysis for me if I just double clicked the .py script from my virtual desktop. I really liked that I didn't have to open PSSE and then load the python script. This is the code that is in my script that used to work in v33 to open PSSE and get it ready to run my functions:

import os,sys


PSSBINPATH = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"


sys.path.append(
PSSBINPATH)


os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH']


import psspy, redirect, re


_i=psspy.getdefaultint()


_f=psspy.getdefaultreal()


_s=psspy.getdefaultchar()


redirect.psse2py()


psspy.psseinit(150000)


import dyntools


import csv


I've tried a number of things I've seen on this forum to get it to open PSSE for me but nothing has worked. I updated the OS path to PSSE34\PSSBIN and I've tried setting the system path to the PSSPY27 and PSSPY37 folders. Neither worked. I have PSSE v34.8 and my PSSE is using python version 2.7.13.

Need Python Script to Open PSSE v34

I have a python script I've been using to for a few years that would open PSSE and run some analysis for me if I just double clicked the .py script from my virtual desktop. I really liked that I didn't have to open PSSE and then load the python script. This is the code that is in my script that used to work in v33 to open PSSE and get it ready to run my functions:

import os,sys
"PSSBINPATH "PSSBINPATH = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"
sys.path.append(
PSSBINPATH)
os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH']
import psspy, redirect, re
_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
_s=psspy.getdefaultchar()
redirect.psse2py()
psspy.psseinit(150000)
import dyntools
import csv

I've tried a number of things I've seen on this forum to get it to open PSSE for me but nothing has worked. I updated the OS path to PSSE34\PSSBIN and I've tried setting the system path to the PSSPY27 and PSSPY37 folders. Neither worked. I have PSSE v34.8 and my PSSE is using python version 2.7.13.

Need Python Script to Open PSSE v34

I have a python script I've been using to for a few years that would open PSSE and run some analysis for me if I just double clicked the .py script from my virtual desktop. I really liked that I didn't have to open PSSE and then load the python script. This is the code that is in my script that used to work in v33 to open PSSE and get it ready to run my functions:

import os,sys
""PSSBINPATH PSSBINPATH = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"
sys.path.append(
PSSBINPATH)sys.path.append_PSSBINPATH)
os.environ['PATH'] = _PSSBINPATH PSSBINPATH + ';' + os.environ['PATH']
import psspy, redirect, re
_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
_s=psspy.getdefaultchar()

redirect.psse2py()
psspy.psseinit(150000)
import dyntools
import csv

I've tried a number of things I've seen on this forum to get it to open PSSE for me but nothing has worked. I updated the OS path to PSSE34\PSSBIN and I've tried setting the system path to the PSSPY27 and PSSPY37 folders. Neither worked. I have PSSE v34.8 and my PSSE is using python version 2.7.13.