per page, with , order by , clip by
Results of 1 - 1 of about 1 for counterfile (0.000 sec.)
atexit --- 終了ハンドラー 9414
atexit --- 終了ハンドラー atexit モジュールは、 終了ハンドラー を登録・解除する関数を定義します。 終了ハンドラーは、プログラムの正常終了時 (例えば sys.exit() が呼び出されたときや、メインモジュールの実行が完了したとき)、より一般的には interp ... 自動保存する方法を示します。 アプリケーションが終了時にこのモジュールを明示的に呼び出す必要はありません。 try : with open ( 'counterfile' ) as infile : _count = int ( infile . read ()) except FileNotFoundError : _count = 0 def incrcounter ( n ): global _count ... _count = _count + n def savecounter (): with open ( 'counterfile' , 'w' ) as outfile : outfile . write ( ' %d ' % _count ) import atexit atexit . register ( savecounter ) register() に指定 ...
https://man.mtool.work/python/3.14/library/atexit.html
PREV 1 NEXT