PEATDB/Extfile.py
def exportExtFiles(self, DB):
        """Get all stored ext files in DB and save to folder"""
        import tkFileDialog, os, shutil
        expdir=tkFileDialog.askdirectory(initialdir=os.getcwd(),title='Select a directory',
                                          mustexist=1,parent=self.parent.master)
        if not expdir:
            return
        path = os.path.join(expdir,'peat-export')
        if not os.path.exists(path):
            os.mkdir(path)
        count=0
        files = DB.getExtFilenames()
        for f in files:
            shutil.copyfile(files[f], os.path.join(path, f))
            count+=1
        tkMessageBox.showinfo("Exported",
                             'Done. Exported %s files to\n%s'%(count,path))
        return
Get all stored ext files in DB and save to folder
Get all stored ext files in DB and save to folder
Get all stored ext files in DB and save to folder
def exportExtFiles(self, DB):
        import tkFileDialog, os, shutil
        expdir=tkFileDialog.askdirectory(initialdir=os.getcwd(),title='Select a directory',
                                          mustexist=1,parent=self.parent.master)
        if not expdir:
            return
        path = os.path.join(expdir,'peat-export')
        if not os.path.exists(path):
            os.mkdir(path)
        count=0
        files = DB.getExtFilenames()
        for f in files:
            shutil.copyfile(files[f], os.path.join(path, f))
            count+=1
        tkMessageBox.showinfo("Exported",
                             'Done. Exported %s files to\n%s'%(count,path))
        return
def exportExtFiles ( self , DB ) : import tkFileDialog , os , shutil expdir = tkFileDialog . askdirectory ( initialdir = os . getcwd ( ) , title = 'Select a directory' , mustexist = 1 , parent = self . parent . master ) if not expdir : return path = os . path . join ( expdir , 'peat-export' ) if not os . path . exists ( path ) : os . mkdir ( path ) count = 0 files = DB . getExtFilenames ( ) for f in files : shutil . copyfile ( files [ f ] , os . path . join ( path , f ) ) count += 1 tkMessageBox . showinfo ( "Exported" , 'Done. Exported %s files to\n%s' % ( count , path ) ) return
Get all stored ext files in DB and save to folder
Get all stored ext files in DB and save to folder
"""Get all stored ext files in DB and save to folder"""
self
DB