Ask Your Question
1

Print a python value in psse progress output

asked 2019-01-22 09:58:28 -0500

L0r3als gravatar image

Hello

I am programming a program in python for psse. I would debug the Python file showing in Pss/e progress file the value of one real variable.

Firstly, I created a report with,

psspy.progressoutput(2,"DetailLVRT_PROGRESS.log",[0,0])

In this file, I tried to print a variable with this command psspy.progress(Qgen[i]) but I have not a reply in pss/e. Also, I tried with the command print(Qgen[i]) but I have a error. Someone knows how could I solve it?

Thank you

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2019-01-23 01:40:53 -0500

perolofl gravatar image

API psspy.progress takes a string as argument, not a real. You must convert the value to a string and also add a carriage return (\n).

psspy.progress(str(Qgen[i])+'\n')
edit flag offensive delete link more

Comments

It works! The problem was solved with str command Thank you!

L0r3als gravatar imageL0r3als ( 2019-01-23 02:47:50 -0500 )edit
1

answered 2019-01-22 12:53:33 -0500

TheBard gravatar image

updated 2019-01-22 12:59:31 -0500

Try with an underline between "progress" and "output". psspy.progress_output. That is the proper syntax.

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: 2019-01-22 09:58:28 -0500

Seen: 1,012 times

Last updated: Jan 23 '19