FileChooserDialog stuck on screen after destroy()
I have a python script, requesting a file from user using FileChoose开发者_运维问答rDialog. When done, it calls .destroy() on the dialog, but immediately after that begins to load the file. Since it is usually a large file, dialog "stays imprinted on screen" until parsing is done, main window created and MainLoop run. Is it possible to "refresh X" or sth, or do I really have to create some "loading window"?
Try to force GTK to refresh the screen
while gtk.events_pending(): # this forces the refresh of the screen
gtk.main_iteration()
before opening the file
精彩评论