Have a look at pygtk faq
http://faq.pygtk.org/index.py?req=show&file=faq03.007.htp


On 23/06/2010 11:19 AM, Brian Rowlands (Greymouth High School) wrote:
> Thanks for that.
>
> Do_stuff consists of things like:
>
>       Impersonate a user
>       Copy Db to c: drive
>       Read sql DB and obtain PC settings
>       Log-off certain types of users
>       Change the registry
>       Set printers inc default printer
>       Write to a log file
>
>       Etc
>
> So event handlers doesn't seem to fix the bill in my mind.
>
> Roughly speaking, the GUI window displays a message to the user. 
> Periodically, this changes as the login script runs through it's tasks. Even 
> displays a goodbye message on the occasions the user shouldn't be allowed to 
> log in.
>
> When I used Perl, there was a window update function. Alas, I'm unsure of 
> where to go now.
>
> BTW, wrote GUI window in Glade if that makes any difference.
>
> Would appreciate feedback
>
> Thanks
>
>
>
> -----Original Message-----
> From: Michael Urman [mailto:[email protected]]
> Sent: Wednesday, 23 June 2010 12:46 p.m.
> To: Brian Rowlands (Greymouth High School)
> Cc: [email protected]
> Subject: Re: [pygtk] Updating a window
>
> On Tue, Jun 22, 2010 at 18:33, Brian Rowlands (Greymouth High School)
> <[email protected]>  wrote:
>    
>> The issue I have is that the outline of the window appears with the inside
>> blank until do_stuff() completes when the window is fully defined.
>>
>> If I have:
>>
>> gtk.main()
>> do_stuff()
>>
>> then the window appears fine but nothing gets done.
>>
>> Don’t know if there is a command to update a window.
>>
>> Probably simple. If not, a reference/pointer would be appreciated.
>>      
> The right answer really depends on what sort of things you are doing
> inside do_stuff. If it's work that makes sense to move piecewise to
> signal handlers, then do that. If it's a batch of work with convenient
> locations to do event processing (say every time through a loop), call
> gtk.main_iteration() from time to time, possibly within a while
> gtk.events_pending().
>
> Welcome to event-based programming!
>    


_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to