Skip to content

Instantly share code, notes, and snippets.

@cwebber314
Last active August 4, 2020 20:48
Show Gist options
  • Save cwebber314/26b0611313174400f2f6c1a989a6281f to your computer and use it in GitHub Desktop.
Save cwebber314/26b0611313174400f2f6c1a989a6281f to your computer and use it in GitHub Desktop.
"""
With Python 2.7 and PSSE v33.x
"""
import os
import sys
print 'Hello world'
sys_paths = [
r'C:\Program Files (x86)\PTI\PSSE33\PSSBIN'
]
env_paths = [
r'C:\PROGRA~2\PTI\PSSE33\PSSBIN',
r'C:\PROGRA~2\PTI\PSSE33\PSSLIB',
]
for path in sys_paths:
sys.path.append(path)
for path in env_paths:
os.environ['PATH'] = os.environ['PATH'] + ';' + path
import psspy
ierr = psspy.psseinit()
psspy.case(r'C:\Program Files (x86)\PTI\PSSE33\EXAMPLE\savnw.sav')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment