[Tutor] initialization window

Rick Pasotto rickp@telocity.com
Tue, 22 Aug 2000 17:15:14 -0400

I've written a program that, as part of its startup processing, scans a
file to build a dictionary. Since this can take several seconds, I'd
like to put up a window explaining the delay. The main program is
defined as a class and I haven't been able to figure out how to popup
this secondary window at the appropriate time. Perhaps part of what I'm
asking is for the sequence of events. How can/should I rearrange the
program so that:

  1) if the file doesn't exist, popup error explanation and exit
  2) if it does exist, popup delay explanation and destroy it when
     the dictionary has been built (or wait for user to press a
     'dismiss' button) and then display regular window?

To further complicate what I'd like to do, could this delay explanation
window double as an 'about' window (with the file reading code wrapped
in an if-statement) to be called from a menu item?

example current stub code:

import Tkinter *

class prog(win):
    def __init__(self,win):
        <build dictionary>

        <widget definitions>

    def proc1(self):

    def proc2(self):


def main():
   root = Tk()

if __name__ == '__main__':

"Must the citizen ever for a moment, or in the least degree, resign his
conscience to the legislator?  Why has every man a conscience, then?  I
think that we should be men first, and subjects afterward."
	-- Henry David Thoreau 
		   Rick Pasotto email: rickp@vnet.net