First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
Are you running PSSE from within Python, or running a Python script in the GUI? You can try exit(), or put your Python code in a function and use return.
![]() | 2 | No.2 Revision |
Are you running PSSE from within Python, or running a Python script in the GUI? You can try exit(), or put your Python code in a function and use return.
def my_stuff():
do something
if stop_script:
return
other stuff..
my_stuff()
![]() | 3 | No.3 Revision |
Are you running PSSE from within Python, or running a Python script in the GUI? You can try exit(), or put your Python code in a function and use return.
def my_stuff():
do something
some code
if stop_script:
return
some other stuff..
code
my_stuff()
![]() | 4 | No.4 Revision |
Are you running PSSE from within Python, or running a Python script in the GUI? You can try exit(), or put your Python code in a function and use return.
def my_stuff():
some code
if stop_script:
return
some other code
my_stuff()
You can also wrap your function in a try-except clause if you want to terminate it if there's a failure.