1

Why doesn't PSSE recognise _i?

Why python do not recognise _i ?

psspy.bus_data_2(12000,[1,3,_i,_i],[220.0, vpu,angle],"B1")

when I hardcode the script to a fix value below, it works

psspy.bus_data_2(12000,[1,3,1,1],[220.0, vpu,angle],"B1")

The reason I would like to get around this is so that I don’t have to specify the values that are considered default values.

anderss's avatar
51
anderss
asked 2012-10-23 00:39:51 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

the _i is a special variable that PSSE adds to the Python environment when you are running scripts from inside PSSE. Here is a list of the other special variables: _i, _f, _s and _o

It is confusing to me why this variable is added without needing to import it.

When running your Python from outside of PSSE, you'll need to import the _i.

from psspy import _i

Otherwise your program will stop with a NameError which means: Python cannot find where this variable has been defined.

JervisW's avatar
1.3k
JervisW
answered 2012-10-23 00:47:24 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer