Sys.exit but without traceback.....
Posted: Fri Nov 17, 2023 2:06 pm
First, thanks for a great program! I am starting to use the scripting capability. Also, I am brand new to Python.
My goal is to generate a script that would automate the star alignment for an Onstep scope. I have able to run an Onstep python program that uses a Onstep python API after dealing with a few minor language incompatibility (Ironpython vs. "official" Python). I am running on a Windows 10 system.
The Onstep python program now runs on both the "official" Python terminal and on the Sharpcap terminal with no apparent erros....except at the very end of execution the Sharpcap/Iron Python terminal displays a traceback whereas the Python terminal does not display the traceback. My limited understanding is that sys.exit should not inherently generate a traceback.
The traceback appears to be connected with the last line of code in the program which is sys.exit. I searched on this forum and someone recommends using 'return' . I tried that but then the program loops indefinitely.
Is there a way to execute and have the program end without a traceback? TIA.
My goal is to generate a script that would automate the star alignment for an Onstep scope. I have able to run an Onstep python program that uses a Onstep python API after dealing with a few minor language incompatibility (Ironpython vs. "official" Python). I am running on a Windows 10 system.
The Onstep python program now runs on both the "official" Python terminal and on the Sharpcap terminal with no apparent erros....except at the very end of execution the Sharpcap/Iron Python terminal displays a traceback whereas the Python terminal does not display the traceback. My limited understanding is that sys.exit should not inherently generate a traceback.
The traceback appears to be connected with the last line of code in the program which is sys.exit. I searched on this forum and someone recommends using 'return' . I tried that but then the program loops indefinitely.
Is there a way to execute and have the program end without a traceback? TIA.