Detect console close

N

new pip

In Windows, when I double click on my .py file, the program runs with
a console. How can I detect when the console is closed? Any code
samples are appreciated.

Thank you.
 
P

Peter Hansen

new said:
In Windows, when I double click on my .py file, the program runs with
a console. How can I detect when the console is closed? Any code
samples are appreciated.

When the console has closed, your program has already exited, if I
understand you correctly (which isn't certain: the question seems
vague). How would you expect to "detect" this with code if your code is
no longer running?

Maybe you should also explain what you're really trying to accomplish,
as there maybe other ways of doing it, or other solutions to your problem.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top