python - Correct way to gracefully exit code prematurely from any section -


i have bunch of threads, classes, methods, , loops. in each level have pass, check, , handle global variable causes section of code exit before completing it's task if user wants exit program early.

every time-dependent section literally wrapped in if not quit_now(): (or similar). cannot code-fu - there better way?


Comments

Popular posts from this blog

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -