Snakey wrote:
> I have created a simple Tkinter GUI. I have a function that needs to be
> executed automatically upon launching the GUI application. How can it be
> done?
how about calling it from the script that creates the GUI, before you
enter the mainloop?
my_function()
root.mainloop()
if you want to call it when the GUI is up and running, you can use the
"wait_visibility" method on the root widget:
root.wait_visibility() # run event loop until window appears
my_function()
root.mainloop()
another approach is to use the "after_idle" method:
root.after_idle(my_function)
root.mainloop()
</F>
_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss