(self, parent)
return self.master
Allows user to set some import options
Allows user to set some import options
Allows user to set some import options
def import_Dialog(self, parent):
        """Allows user to set some import options"""

        self.parent=parent
        self.master=Toplevel()
        self.master.title("Import Data")
        self.xsize = 450
        self.ysize = 370
        top=self.master.winfo_toplevel()
        self.master.geometry('400x400+200+200')

        self.sep_choice = Combobox(self.master,
                            text = 'Record separator:',
                            textvariable = self.var_sep,
                            values = self.separator_list,
                            width = 4)
        self.var_sep.trace('w', self.update_display)
        Label(self.master,text='separator:').grid(row=0,column=0,sticky='nw',padx=2,pady=2)
        self.sep_choice.grid(row=0,column=1,sticky='nw',padx=2,pady=2)
        #place for text preview frame
        self.textframe = Frame(self.master)
        self.textframe.grid(row=1,column=0,columnspan=5,sticky='news',padx=2,pady=2)
        self.previewarea = Text(self.textframe, bg='white', width=400, height=500)
        self.previewarea.pack(fill=BOTH, expand=1)
        #buttons
        self.openButton = Button(self.master, text = 'Open File',
                command = self.do_openFile )
        self.openButton.grid(row=3,column=0,sticky='news',padx=2,pady=2)
        self.importButton = Button(self.master, text = 'Do Import',
                command = self.do_ModelImport )
        self.importButton.grid(row=3,column=1,sticky='news',padx=2,pady=2)
        self.CancelButton = Button(self.master, text = 'Cancel',
                command = self.close )
        self.CancelButton.grid(row=3,column=2,sticky='news',padx=2,pady=2)
        self.master.columnconfigure(0,weight=1)
        self.master.rowconfigure(1,weight=1)
        return self.master
def import_Dialog ( self , parent ) : self . parent = parent self . master = Toplevel ( ) self . master . title ( "Import Data" ) self . xsize = 450 self . ysize = 370 top = self . master . winfo_toplevel ( ) self . master . geometry ( '400x400+200+200' ) self . sep_choice = Combobox ( self . master , text = 'Record separator:' , textvariable = self . var_sep , values = self . separator_list , width = 4 ) self . var_sep . trace ( 'w' , self . update_display ) Label ( self . master , text = 'separator:' ) . grid ( row = 0 , column = 0 , sticky = 'nw' , padx = 2 , pady = 2 ) self . sep_choice . grid ( row = 0 , column = 1 , sticky = 'nw' , padx = 2 , pady = 2 ) #place for text preview frame self . textframe = Frame ( self . master ) self . textframe . grid ( row = 1 , column = 0 , columnspan = 5 , sticky = 'news' , padx = 2 , pady = 2 ) self . previewarea = Text ( self . textframe , bg = 'white' , width = 400 , height = 500 ) self . previewarea . pack ( fill = BOTH , expand = 1 ) #buttons self . openButton = Button ( self . master , text = 'Open File' , command = self . do_openFile ) self . openButton . grid ( row = 3 , column = 0 , sticky = 'news' , padx = 2 , pady = 2 ) self . importButton = Button ( self . master , text = 'Do Import' , command = self . do_ModelImport ) self . importButton . grid ( row = 3 , column = 1 , sticky = 'news' , padx = 2 , pady = 2 ) self . CancelButton = Button ( self . master , text = 'Cancel' , command = self . close ) self . CancelButton . grid ( row = 3 , column = 2 , sticky = 'news' , padx = 2 , pady = 2 ) self . master . columnconfigure ( 0 , weight = 1 ) self . master . rowconfigure ( 1 , weight = 1 ) return self . master