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

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered Apr 7 '5

likethevegetable gravatar image

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.

click to hide/show revision 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()
click to hide/show revision 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()
click to hide/show revision 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.