Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Psspy Python Script Issues

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.linesperpageonedevice(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)

click to hide/show revision 2
No.2 Revision

Psspy Python Script Issues

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

sys import win32com.client

win32com.client import string ,pywintypes

string, pywintypes import excelpy

excelpy import psspy as pp

pp from datetime import date

date from datetime import datetime

datetime

mypath = os.path.dirname(os.path.abspath(file))

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

pp.psseinit(80000)

pp.linesperpageonedevice(1, 60)

_i, _f = pp.getbatdefaults()

pp.getbatdefaults() _s = pp.getdefaultchar()

pp.getdefaultchar()

_PSSBINPATH = r"C:\Program Files\PTI\PSSE35\35.6\PSSBIN"

Files\PTI\PSSE35\35.6\PSSBIN" os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH']

sys.path.append(_PSSBINPATH)

os.environ['PATH'] sys.path.append(_PSSBINPATH`enter code here`