Benchtop Measurement and Test
Distributed Measurement and Control
Systems Engineering Software
Perspectives showcases how NI sees what’s next in the world of test and technology.
You can request repair, RMA, schedule calibration, or get technical support. A valid service agreement may be required.
Provides support for NI data acquisition and signal conditioning devices.
Provides support for Ethernet, GPIB, serial, USB, and other types of instruments.
Provides support for NI GPIB controllers and NI embedded controllers with GPIB ports.
as the title says, I'm wondering if there is a graceful way to exit a python script.
Calling sys.exit / raising SystemExit always seems to trigger an error message, independently of the exit code that is passed. (I tried it with 0, 1, -1, None)
If I understood it correctly, I think the best way is to use the return command.
# Insert your code here
unfortunately that can only be used within functions.
And execution will continue where the function was called. It will not exit the script.
When used outside of a function it is considered a syntax error.
The script won't even start.
What do you need our team of experts to assist you with?
We'll be in touch soon!