How to run a python app in the background?

kevintylr at gmail.com kevintylr at gmail.com
Thu Nov 20 19:13:55 EST 2008


I'm a beginning programmer writing a tiny app with a TkInter GUI.
Desired functionality:
When the user enters a time interval, I want the windows to disappear,
and the program to lie dormant until the scheduled time (currently
using sched module), when it would pop up another window and execute a
command.

Current functionality:
When the user clicks through a showinfo() window, root.quit() is
executed. As I understand it, the program will then complete the
commands that come after root.mainloop(), where I have put
schedule.entry(...) and schedule.run().
The problem is that the windows just hang until the schedule event
happens. The schedule is using time.sleep as the delay. And I have no
idea how I'd create a notification popup when the command runs.

Is there any obvious solution to this problem? Or a tricky solution?
Should I put the scheduler before root.mainloop()? Can I still kill
the main window if I do that?
I want the app to be totally silent during the interim period.

Thanks for your help
Kevin



More information about the Python-list mailing list