Ask Your Question
0

Removing "Terminal Read" on PSSE. User input on output bar

asked 2017-08-21 09:03:21 -0500

mikerosz gravatar image

Is it possible to remove the "Terminal Read" dialog on PSSE ? Is there a way for the user to input desired value on output bar or somewhere else?

Traceback (most recent call last):
File "C:\Users\RoszkowskiM\Desktop\win4.py", line 133, in <module>
psspy.two_winding_chng_4(from_,to,'%s'%digit,[_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f, max_value, min_value,_f,_f,_f],[])
File ".\psspy.py", line 25578, in two_winding_chng_4
TypeError: an integer is required
ValueError: invalid literal for int() with base 10: 'T1'

for row in data:
    data_location, year_link, from_, to, min_value,max_value,name2,tla_2,digit = row[5:14]
    output = 'From Bus #: {}\tTo Bus #: {}\tVMAX: {} pu\tVMIN: {} pu\t'
    if year_link == year and data_location == location and tla_2==location:
       from_=int(from_)
       to=int(to)
       min_value=float(min_value)
       max_value=float(max_value)
       digit=int(digit)
       print(output.format(from_, to, max_value, min_value))
      _i=psspy.getdefaultint()
      _f=psspy.getdefaultreal()
       psspy.two_winding_chng_4(from_,to,'%s'%digit,[_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f, max_value, min_value,_f,_f,_f],[])
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2020-11-16 02:48:59 -0500

the--duke gravatar image

I tried to suppress the prompt output (I/O control -> ODEV -> Suppress output or psspy.prompt_output(6,"",[0,0])) but whenever I tried to input something, either by using raw_input() or by using psspy.userin(), the 'Terminal Read' window still popped up. I believe this is the only way to reach to this window by the user's actions, so I don't think there is any other immediate way of suppressing it. Thus, I don't think it's possible to avoid the window at all.

I will try to work around it whenever I have time, by printing the requests to the progress window, then trying to reach the CLI Input without executing it, and then importing it to the desired variable. I shall return to report if I ever manage to do it or find any other way around it.

edit flag offensive delete link more
0

answered 2017-08-28 15:16:00 -0500

EBahr gravatar image

Your question and code seem to be two separate issues. For your question, I am guessing you are trying to read in an .idv (or other file) from within python. It will pop-up a Terminal Read window if your file doesn't have the appropriate syntax (i.e. final 0, or improper data entry). Make sure these files work properly before you try and use them in your python code. Better yet, convert the code over to python.

Your issue with your code seems to be that you are trying to convert a string into an integer. I am honestly not sure how you made it past digit=int(digit), but you should just leave that bit of code out and treat digit as a string.

edit flag offensive delete link more

Comments

So is there a way to remove the `Terminal Read window`.

mikerosz gravatar imagemikerosz ( 2017-08-30 14:51:17 -0500 )edit

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

1 follower

Stats

Asked: 2017-08-21 09:03:21 -0500

Seen: 1,608 times

Last updated: Nov 16 '20