First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hi, Everyone
I am wondering if anyone have worked out how to run "Compile" and "Cload4" from python with pss/e 32. I understand there is environment manager that can be used but I am trying to automate entire dynamic study run including these commands. I used to use batch file with Pss/e 29 and it was working fine but I am migrating all my scripts to python thinking it would be efficient.
I have tried using "subprocess" module to pass commands to "cmd" prompt but it does not quite work.
import sys,os,subprocess
def open_app():
p=subprocess.Popen([r"C:\Windows\SysWOW64\cmd.exe"],shell=True)
q=subprocess.Popen([r"C:\Program Files (x86)\PTI\PSSE32\SET_PSSE_PATH.BAT"],shell=True)
subprocess.Popen(["dir/b"],shell=True)
subprocess.Popen(['psse'])
open_app()
The above code set path for pss/e and works fine upto "dir/b" command but does not recognize "psse" as a command.
It would be great if someone can help me with this part of the code and bridge the gap in my dynamic study automation.
Thanks