[Tkinter-discuss] Method to call when gui is first displayed

mkieverpy at tlink.de mkieverpy at tlink.de
Mon Nov 27 17:44:38 CET 2006


> On Mon, Nov 27, 2006 at 09:54:52AM +0100, mkieverpy at tlink.de wrote:
> > >I want to call the function which talks to CVS after the gui is displayed,
> > >but without formal having to do anything.
> 			.
> > The problem is: you should use the event callback just to start
> > the network activity, not monitoring it.
> > You'll need some kind of threading/subprocesses or other
> > to do this.
> > The event types are not well documented in my tk/tcl installation,
> > so I cannot tell you if '' is the best choice here.
> 			.
> ?  I suspect we're confusing each other.  It certainly is possible
> to monitor network activity in an event-oriented way; were you say-
> ing that you do not recommend such an approach?

No. What I wanted to say is that the gui is inactive while an event callback
is processed. So the Map-event callback should only be used to initiate the
network activity but return immediately afterwards.
(not polling/waiting for the end of network transfer).
Different events/callbacks or similar should be used for monitoring.

But, of course, Fredrik Lundh's proposed method is better
(I did not know this one), if the application allows for network
activity to finish with the gui being inactive.

Matthias Kievernagel
(mkiever - at - web - dot - de)



More information about the Tkinter-discuss mailing list