PEATDB/Ekin/ExpConditions.py
def Load_File(self):
        """Load the exp protocol from a file and dump the text in a list to be stored"""
        import tkFileDialog, os
        self.protocol = tkFileDialog.askopenfile(mode='r',filetypes= [("all files", "*")], title="Choose A File")

        if self.protocol == None:
            return
        import fileinput
        self.protocol_textdump=[]
        self.fileShow.delete(0, END)
        for line in fileinput.input(self.protocol.name):
            S=line.rstrip('\n')
            self.protocol_textdump.append(line)
            self.fileShow.insert(END,S+'.')
            #print 'appending',line

        if self.protocol != None:
            for I in self.Meta_Data:
                if I['Name'] == 'Experimental protocol':
                    I['value'] = self.protocol_textdump

        self.meta_win.focus_set()

        return
Load the exp protocol from a file and dump the text in a list to be stored
Load the exp protocol from a file and dump the text in a list to be stored
Load the exp protocol from a file and dump the text in a list to be stored
def Load_File(self):
        import tkFileDialog, os
        self.protocol = tkFileDialog.askopenfile(mode='r',filetypes= [("all files", "*")], title="Choose A File")
        if self.protocol == None:
            return
        import fileinput
        self.protocol_textdump=[]
        self.fileShow.delete(0, END)
        for line in fileinput.input(self.protocol.name):
            S=line.rstrip('\n')
            self.protocol_textdump.append(line)
            self.fileShow.insert(END,S+'.')
        if self.protocol != None:
            for I in self.Meta_Data:
                if I['Name'] == 'Experimental protocol':
                    I['value'] = self.protocol_textdump
        self.meta_win.focus_set()
        return
def Load_File ( self ) : import tkFileDialog , os self . protocol = tkFileDialog . askopenfile ( mode = 'r' , filetypes = [ ( "all files" , "*" ) ] , title = "Choose A File" ) if self . protocol == None : return import fileinput self . protocol_textdump = [ ] self . fileShow . delete ( 0 , END ) for line in fileinput . input ( self . protocol . name ) : S = line . rstrip ( '\n' ) self . protocol_textdump . append ( line ) self . fileShow . insert ( END , S + '.' ) if self . protocol != None : for I in self . Meta_Data : if I [ 'Name' ] == 'Experimental protocol' : I [ 'value' ] = self . protocol_textdump self . meta_win . focus_set ( ) return
Load the exp protocol from a file and dump the text in a list to be stored
Load the exp protocol from a file and dump the text in a list to be stored
"""Load the exp protocol from a file and dump the text in a list to be stored""" #print 'appending',line
self