I would recommend that you work with an object from a class, and using def
__del__(self):
I think when Windows shutdown, it send a stop/quit signal to all processes.
When your Python is stopped by the OS, it can stop gracefully, and write the
info in the file to backup, before it dies. This
On 3/9/22, H.Fujii wrote:
> I'm currently developing a console program in Python 3.9.
> I want to detect the shutdown of Windows and save the data to a file
> safely.
> I created a sample program by referring to the following URL.
>
I'm currently developing a console program in Python 3.9.
I want to detect the shutdown of Windows and save the data to a file safely.
I created a sample program by referring to the following URL.
https://docs.microsoft.com/en-us/windows/console/registering-a-control-handler-function
However,