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

Ask Your Question
1

Importing self-made modules and PSSPY

asked May 28 '13

Daniel gravatar image

Hi everybody.

I am trying to build a more o less complex set of scripts with PSSPY.

Usually with python I have a main.py and then several submodules (e.g. power_flow.py, dynamics.py ...).

However, this doesn't work when I am using PSSPY. I can either import PSSPY in the main.py or in one of the submodules. But if I try to call PSSPY functions from both, the interpreter will say that the functions I am trying to call doesn't exist.

Has anyone faced the same problem?

1 answer

Sort by » oldest newest most voted
0

answered Jun 4 '13

JervisW gravatar image

You'll need to tell Python where PSSE is installed. Otherwise it cannot find the psspy library.

There is a question about that here:

https://psspy.org/psse-help-forum/que...

To summarise that link, you'll need to append your pssbin folder to the sys.path variable before you can import psspy.

You should do this in your main.py before you start importing other modules that require psspy.

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: May 28 '13

Seen: 705 times

Last updated: Jun 04 '13