Python atexit
zlutystrop
1,399 views
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def first():
print("Executing the first function.")
def second(_):
print("Executing the second function.")
def third(a, b, c, d):
print("Executing the third function.")
print(len(a + b + c + d))
import atexit
atexit.register(first)
atexit.register(second, "some argument which will be ignored")
atexit.register(third, "there", "are", "four", "args")
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content