Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

At the beggining of the code you need to have something like this :

import standard libraries

import os, sys

add psspy to the path

sys.path.append(r"C:\Program Files (x86)\PTI\PSSE34\PSSBIN") os.environ['PATH'] = (r"C:\Program Files (x86)\PTI\PSSE34\PSSBIN;" + os.environ['PATH']) sys.path.append(r"C:\Program Files (x86)\PTI\PSSE34\PSSPY27") os.environ['PATH'] = (r"C:\Program Files (x86)\PTI\PSSE34\PSSPY27;" + os.environ['PATH'])

imported libraries for psse

import psspy from psspy import _i from psspy import _f from psspy import _s import redirect

It doesnt necessarily has to look like this, but check your folders and try in every folder related to psse and python til you find the one which contains the psspy. In my case the standard code didnt work in all my computers, but after trying many directories (folders) I was able to make it work everytime.

click to hide/show revision 2
No.2 Revision

At the beggining of the code you need to have something like this :

import
#import standard libraries

libraries import os, sys

add sys #add psspy to the path

path sys.path.append(r"C:\Program Files (x86)\PTI\PSSE34\PSSBIN") os.environ['PATH'] = (r"C:\Program Files (x86)\PTI\PSSE34\PSSBIN;" + os.environ['PATH']) sys.path.append(r"C:\Program Files (x86)\PTI\PSSE34\PSSPY27") os.environ['PATH'] = (r"C:\Program Files (x86)\PTI\PSSE34\PSSPY27;" + os.environ['PATH'])

os.environ['PATH'])

imported #imported libraries for psse

psse import psspy from psspy import _i from psspy import _f from psspy import _s import redirect

redirect

It doesnt necessarily has to look like this, but check your folders and try in every folder related to psse and python til you find the one which contains the psspy. In my case the standard code didnt work in all my computers, but after trying many directories (folders) I was able to make it work everytime.