標準添付のatexitモジュールはプロセス終了時の動作を記述かのうです。
もう末尾にやっつけ終了処理を書かなくても良いのです(涙
実際のところ
import atexit @atexit.register def end(): print("Done:The Process") print("first")
$ python test_exit.py first Done:The Process
標準添付のatexitモジュールはプロセス終了時の動作を記述かのうです。
もう末尾にやっつけ終了処理を書かなくても良いのです(涙
import atexit @atexit.register def end(): print("Done:The Process") print("first")
$ python test_exit.py first Done:The Process