First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Psspy Python Script Issues

asked Mar 13 '4

Shigeru gravatar image

updated Mar 14 '4

jconto gravatar image

Hello,

I am trying to updated some python scripts to be compatible with the new PSSe version 35. However, when I try to run the python script in an IDE (PyCharm), the script wold not execute and would give a "no module named excelpy" and "no module named psspy". Please give any advice on how to resolve this.

Library Import Statements:

import os, sys
import win32com.client
import string, pywintypes
import excelpy
import psspy as pp
from datetime import date
from datetime import datetime

mypath = os.path.dirname(os.path.abspath(__file__))
pp.psseinit(80000)
pp.lines_per_page_one_device(1, 60)

_i, _f = pp.getbatdefaults()
_s = pp.getdefaultchar()

_PSSBINPATH = r"C:\Program Files\PTI\PSSE35\35.6\PSSBIN"
os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH']
sys.path.append(_PSSBINPATH`enter code here`

1 answer

Sort by » oldest newest most voted
0

answered Mar 13 '4

perolofl gravatar image

You have to import psse35 before excelpy and psspy.

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Mar 13 '4

Seen: 237 times

Last updated: Mar 13 '24