Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

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()

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()

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.