Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories Scripting
Created by Guest
Created on Feb 1, 2023

add API to terminiate python data function script execution

One of our customers wants to terminiate python script execution on conditions.


e.g.


if xx > 100:

# terminate script execution here.


# carry on with other stuffs.


We tried with sys.exit() but this will terminate the entire python process hence ended up with an error in Analyst.


  • Attach files
  • Guest
    Reply
    |
    Feb 1, 2023

    It seems that python data function script is executed inside an exec() call,

    some approaches in this article might be helpful. But these need to be done from within spotfire.

    https://stackoverflow.com/questions/51905191/how-do-i-stop-execution-inside-exec-command-in-python-3