First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

Print a python value in psse progress output

asked Jan 22 '19

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

2 answers

Sort by » oldest newest most voted
1

answered Jan 23 '19

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')
link

Comments

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

L0r3als gravatar imageL0r3als (Jan 23 '19)
1

answered Jan 22 '19

TheBard gravatar image

updated Jan 22 '19

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

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jan 22 '19

Seen: 1,091 times

Last updated: Jan 23 '19