PEATDB/Labbook.py
def new_project(self, data=None):
        """Create a new table, with model and add the frame"""
        if hasattr(self,'currenttable'):
            self.notebook.destroy()
            self.currenttable.destroy()

        #Create the sheets dict
        self.sheets = {}
        self.notebook = Pmw.NoteBook(self.labbook_win, raisecommand=self.setcurrenttable)
        self.notebook.pack(fill='both', expand=1, padx=4, pady=4)
        if data !=None:
            for s in data.keys():
                sdata = data[s]
                #try:
                self.add_Sheet(s ,sdata)
                #except:
                #    print 'skipping'
        else:
            #do the table adding stuff for the initial sheet
            self.add_Sheet('sheet1')
        self.notebook.setnaturalsize()
        self.setcurrenttable()
        return
Create a new table, with model and add the frame
Create a new table, with model and add the frame
Create a new table with model and add the frame
def new_project(self, data=None):
        if hasattr(self,'currenttable'):
            self.notebook.destroy()
            self.currenttable.destroy()
        self.sheets = {}
        self.notebook = Pmw.NoteBook(self.labbook_win, raisecommand=self.setcurrenttable)
        self.notebook.pack(fill='both', expand=1, padx=4, pady=4)
        if data !=None:
            for s in data.keys():
                sdata = data[s]
                self.add_Sheet(s ,sdata)
        else:
            self.add_Sheet('sheet1')
        self.notebook.setnaturalsize()
        self.setcurrenttable()
        return
def new_project ( self , data = None ) : if hasattr ( self , 'currenttable' ) : self . notebook . destroy ( ) self . currenttable . destroy ( ) self . sheets = { } self . notebook = Pmw . NoteBook ( self . labbook_win , raisecommand = self . setcurrenttable ) self . notebook . pack ( fill = 'both' , expand = 1 , padx = 4 , pady = 4 ) if data != None : for s in data . keys ( ) : sdata = data [ s ] self . add_Sheet ( s , sdata ) else : self . add_Sheet ( 'sheet1' ) self . notebook . setnaturalsize ( ) self . setcurrenttable ( ) return
Create a new table, with model and add the frame
Create a new table with model and add the frame
"""Create a new table, with model and add the frame""" #Create the sheets dict #try: #except: #    print 'skipping' #do the table adding stuff for the initial sheet
self
data