First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
This is what I do:
pssbin34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'
psspy34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'
psspy34py3 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY34'
path_psspy = paths.psspy34 # assume python 2
if sys.version_info[0] >= 3: # if using Python 3:
path_psspy = paths.psspy34py3
sys.path.insert(0, paths.pssbin34) # add psse directory to first path, required to import psspy
sys.path.insert(0, path_psspy) # add psse directory to first path, required to import psspy
os.environ['PATH'] += ';' + paths.pssbin34 # this tells PSS/E where to find itself...
os.environ['PATH'] += ';' + path_psspy # this tells PSS/E where to find itself...
2 | No.2 Revision |
This is what I do:
pssbin34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'
psspy34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'
psspy34py3 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY34'
path_psspy = paths.psspy34 # assume python 2
if sys.version_info[0] >= 3: # if using Python 3:
path_psspy = paths.psspy34py3
sys.path.insert(0, paths.pssbin34) # add psse directory dir to first path, required to for import psspy
sys.path.insert(0, path_psspy) # add psse directory to first path, required to import psspy
path_psspy)
os.environ['PATH'] += ';' + paths.pssbin34 # this tells PSS/E where to find itself...
os.environ['PATH'] += ';' + path_psspy # this tells PSS/E where to find itself...
path_psspy
3 | No.3 Revision |
This is what I do:
pssbin34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'
psspy34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'
psspy34py3 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY34'
path_psspy = paths.psspy34 # assume python 2
if sys.version_info[0] >= 3: # if using Python 3:
path_psspy = paths.psspy34py3
sys.path.insert(0, paths.pssbin34) # add psse dir to path, required for import psspy
sys.path.insert(0, path_psspy)
os.environ['PATH'] += ';' + paths.pssbin34 # this tells PSS/E where to find itself...
os.environ['PATH'] += ';' + path_psspy
4 | No.4 Revision |
This is what I do:do, try the same but add this path "C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN\
pssbin34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'
psspy34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'
psspy34py3 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY34'
path_psspy = paths.psspy34 # assume python 2
if sys.version_info[0] >= 3: # if using Python 3:
path_psspy = paths.psspy34py3
sys.path.insert(0, paths.pssbin34) # add psse dir to path, required for import psspy
sys.path.insert(0, path_psspy)
os.environ['PATH'] += ';' + paths.pssbin34 # this tells PSS/E where to find itself...
os.environ['PATH'] += ';' + path_psspy
5 | No.5 Revision |
You have a simple mislabeled variable error as perofl pointed out.
This is what I do, try the same but add this path "C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN\
pssbin34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'
psspy34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'
psspy34py3 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY34'
path_psspy = paths.psspy34 # assume python 2
if sys.version_info[0] >= 3: # if using Python 3:
path_psspy = paths.psspy34py3
sys.path.insert(0, paths.pssbin34) # add psse dir to path, required for import psspy
sys.path.insert(0, path_psspy)
os.environ['PATH'] += ';' + paths.pssbin34 # this tells PSS/E where to find itself...
os.environ['PATH'] += ';' + path_psspy