Ask Your Question

There are some API commands which can be identified inside Psse GUi but can not be identified using python IDLE

asked 2021-05-26 01:14:08 -0500

snapshot gravatar image

1.Inside PSSE GUI

" psspy.machine_chng_2(12,r"""1""",[_i,_i,_i,_i,_i,_i],[ 80.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])" can be effective
  1. Outside Psse, using Python IDLE It shows that " NameError: name '_i' is not defined"

How does that happen? Maybe the "i" and "f" should all be changed into specific figures ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2022-09-08 01:46:08 -0500

xgreen gravatar image

or add this:

from psspy import _i, _f

edit flag offensive delete link more


Thanks, very nice solution!

perolofl gravatar imageperolofl ( 2022-09-09 03:23:48 -0500 )edit

answered 2021-05-26 05:13:19 -0500

perolofl gravatar image

Use this in your script:

import psspy
_i = psspy.getdefaultint()
_f = psspy.getdefaultreal()
_s = psspy.getdefaultchar()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools



Asked: 2021-05-26 01:14:08 -0500

Seen: 159 times

Last updated: Sep 08