How to run a python app in the background?

Aaron Brady castironpi at
Fri Nov 21 03:36:48 CET 2008

On Nov 20, 6:13 pm, kevint... at wrote:
> 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
> 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

Just guessing.  Try 'delete root' after 'root.mainloop()', to see if
you can get it to clean up its resources.  Otherwise, subprocesses
might be what you want.

More information about the Python-list mailing list