PEATDB/Tables_IO.py
def import_Dialog(self, parent):
        """Allows user to set some import options"""
        import Pmw
        self.parent=parent
        self.master=Toplevel()
        self.master.title("Import Data")
        self.xsize = 450
        self.ysize = 370
        top=self.master.winfo_toplevel()
        rootx=top.winfo_rootx()
        rooty=top.winfo_rooty()

        self.sep_choice = Pmw.OptionMenu(
            parent = self.master,labelpos = 'w',
            label_text = 'Record separator:',
            menubutton_textvariable = self.var_sep,
            items = self.separator_list.keys(),
            initialitem = ',',
            menubutton_width = 4,
            command= self.update_display)
        
        self.sep_choice.grid(row=0,column=0,sticky='nw',padx=2,pady=2)
        #place for text preview frame

        self.textframe=Pmw.ScrolledFrame(self.master,
                    labelpos = 'n', label_text = 'Preview',
                    usehullsize = 1,
                    hull_width = 450,
                    hull_height = 300)
        self.textframe.grid(row=1,column=0,columnspan=5,sticky='news',padx=2,pady=2)
        self.previewarea = Text(self.textframe.interior(), 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
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):
        import Pmw
        self.parent=parent
        self.master=Toplevel()
        self.master.title("Import Data")
        self.xsize = 450
        self.ysize = 370
        top=self.master.winfo_toplevel()
        rootx=top.winfo_rootx()
        rooty=top.winfo_rooty()
        self.sep_choice = Pmw.OptionMenu(
            parent = self.master,labelpos = 'w',
            label_text = 'Record separator:',
            menubutton_textvariable = self.var_sep,
            items = self.separator_list.keys(),
            initialitem = ',',
            menubutton_width = 4,
            command= self.update_display)
        self.sep_choice.grid(row=0,column=0,sticky='nw',padx=2,pady=2)
        self.textframe=Pmw.ScrolledFrame(self.master,
                    labelpos = 'n', label_text = 'Preview',
                    usehullsize = 1,
                    hull_width = 450,
                    hull_height = 300)
        self.textframe.grid(row=1,column=0,columnspan=5,sticky='news',padx=2,pady=2)
        self.previewarea = Text(self.textframe.interior(), bg='white', width=400, height=500)
        self.previewarea.pack(fill=BOTH, expand=1)
        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 ) : import Pmw self . parent = parent self . master = Toplevel ( ) self . master . title ( "Import Data" ) self . xsize = 450 self . ysize = 370 top = self . master . winfo_toplevel ( ) rootx = top . winfo_rootx ( ) rooty = top . winfo_rooty ( ) self . sep_choice = Pmw . OptionMenu ( parent = self . master , labelpos = 'w' , label_text = 'Record separator:' , menubutton_textvariable = self . var_sep , items = self . separator_list . keys ( ) , initialitem = ',' , menubutton_width = 4 , command = self . update_display ) self . sep_choice . grid ( row = 0 , column = 0 , sticky = 'nw' , padx = 2 , pady = 2 ) self . textframe = Pmw . ScrolledFrame ( self . master , labelpos = 'n' , label_text = 'Preview' , usehullsize = 1 , hull_width = 450 , hull_height = 300 ) self . textframe . grid ( row = 1 , column = 0 , columnspan = 5 , sticky = 'news' , padx = 2 , pady = 2 ) self . previewarea = Text ( self . textframe . interior ( ) , bg = 'white' , width = 400 , height = 500 ) self . previewarea . pack ( fill = BOTH , expand = 1 ) 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
Allows user to set some import options
Allows user to set some import options
"""Allows user to set some import options""" #place for text preview frame #buttons
self
parent