This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import groupby | |
from operator import itemgetter | |
attr_type = itemgetter(0) | |
import psspy | |
def subsystem_info(name, attributes, sid=-1, inservice=True): | |
""" | |
Returns requested attributes from the PSS(r)E subsystem API | |
for the given subsystem id and subsystem element name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
featured on our blog all about PSSE and Python: | |
blog.whit.com.au | |
""" | |
import os,sys | |
PSSE_LOCATION = r"C:\Program Files\PTI\PSSE32\PSSBIN" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
PSSE_LOCATION = r"C:\Program Files\PTI\PSSE32\PSSBIN" | |
sys.path.append(PSSE_LOCATION) | |
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION | |
import psspy | |
import redirect | |
redirect.psse2py() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
sys.path.append(r"C:\Program Files\PTI\PSSE32\PSSBIN") | |
os.environ['PATH'] = (r"C:\Program Files\PTI\PSSE32\PSSBIN;" | |
+ os.environ['PATH']) | |
os.chdir(r"C:\work_dir") | |
import psspy | |
import redirect | |
_i=psspy.getdefaultint() | |
_f=psspy.getdefaultreal() | |
_s=psspy.getdefaultchar() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example of installing django-taggit onto a Zinnia Entry model | |
(django-blog-zinnia) which traditionally uses django-tagging. | |
The django-taggit manager is installed on the tagged_as attribute because | |
tagged is already taken by the existing django-tagging installation (which we don't remove). | |
""" | |
from django.contrib import admin |
NewerOlder