Hi there
I am learning python right now, and am making a simple console game. I just need help with one thing. Is there a way to make python do something when you clck the X or close it in any way? Like store a value in a text file.
Thanks.
Hi there
I am learning python right now, and am making a simple console game. I just need help with one thing. Is there a way to make python do something when you clck the X or close it in any way? Like store a value in a text file.
Thanks.
if __name__ == "__main__":
try:
play_game()
finally:
with open("/tmp/exit_message", "w") as f:
f.write("bye bye!")
2 things.