Ask Your Question
1

Why doesn't PSSE recognise _i?

asked 2012-10-23 00:39:51 -0500

anderss gravatar image

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.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
3

answered 2012-10-23 00:47:24 -0500

JervisW gravatar image

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.

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

Stats

Asked: 2012-10-23 00:01:51 -0500

Seen: 1,686 times

Last updated: Oct 23 '12