T
Torsten Bronger
Hallöchen!
When my __del__ methods are called because the program is being
terminated, I experience difficulties in calling functions that I
need for a clean shutdown of my instances. So far, there has been
only one of these functions, and a class-local alias solved the
problem. However, now there are many of them.
Is there a way to detect whether the program is being terminated?
(In this case, I wouldn't care and return from __del__ immediately.)
Or do you know a cleaner solution? For example, if I have
import vpp43
would it help to say
def __init__(self):
__vpp43 = vpp43
...
to guarantee that I can access all the routines in vpp43 in the
__del__ method?
Tschö,
Torsten.
When my __del__ methods are called because the program is being
terminated, I experience difficulties in calling functions that I
need for a clean shutdown of my instances. So far, there has been
only one of these functions, and a class-local alias solved the
problem. However, now there are many of them.
Is there a way to detect whether the program is being terminated?
(In this case, I wouldn't care and return from __del__ immediately.)
Or do you know a cleaner solution? For example, if I have
import vpp43
would it help to say
def __init__(self):
__vpp43 = vpp43
...
to guarantee that I can access all the routines in vpp43 in the
__del__ method?
Tschö,
Torsten.