Open pietvo opened 1 month ago
Use KeyboardInterrupt
instead of SystemExit
.
except (KeyboardInterrupt, SystemExit) as e:
Does that mean that in Pythonista sys.exit()
is treated like a keyboard interrupt (control-c)?
iOS does not really allow apps to shutdown so Pythonista cannot behave exactly like Python on desktop operating systems.
The following python script gives the expected output on Python 3.10 (and other versions) on MacOS, but not in Pythonista 3 (version 3.4).
If
SystemExit
is replaced byBaseException
, it works.