Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/h/e/hellanzb-HEAD/Hellanzb/PostProcessor.py   hellanzb(Download)
            if os.path.isfile(os.path.join(self.dirName, file)):
                move(os.path.join(self.dirName, file),
                     os.path.join(self.dirName, Hellanzb.PROCESSED_SUBDIR, file))
 
        for file in os.listdir(self.dirName):
                   ext.lower() in Hellanzb.NOT_REQUIRED_FILE_TYPES:
                move(os.path.join(self.dirName, file),
                     os.path.join(self.dirName, Hellanzb.PROCESSED_SUBDIR, file))
 
            elif re.match(r'.*_duplicate\d{0,4}', file):
                move(os.path.join(self.dirName, file),
                     os.path.join(self.dirName, Hellanzb.PROCESSED_SUBDIR, file))
 
        handledPars = False
        if os.path.isfile(os.path.join(self.dirName, Hellanzb.PROCESSED_SUBDIR, '.par_done')):
        # there was absolutely no need for any of the files in the processed dir,
        # otherwise tough! (otherwise disable the option and redownload again)
        deleteDir = os.path.join(self.dirName, Hellanzb.PROCESSED_SUBDIR)
        deletedFiles = walk(deleteDir, 1, return_folders = 1)
        deletedFiles.sort()

src/h/e/hellanzb-HEAD/Hellanzb/PostProcessorUtil.py   hellanzb(Download)
    # Delete the processed dir only if it doesn't contain anything
    try:
        os.rmdir(os.path.join(dirName, Hellanzb.PROCESSED_SUBDIR))
    except OSError:
        pass
    if returnCode == 0:
        # Successful, move the old file away
        move(fileName, os.path.join(os.path.dirname(fileName), Hellanzb.PROCESSED_SUBDIR,
                                    os.path.basename(fileName)))
 
def moveToProcessed(file):
    """ Move files to the processed dir """
    move(file, os.path.join(os.path.dirname(file), Hellanzb.PROCESSED_SUBDIR,
                            os.path.basename(file)))
 
 
    # And make a note of the completion
    touch(os.path.join(dirName, Hellanzb.PROCESSED_SUBDIR,
                       '.' + processStateName + '_done'))
 
def moveBackSamples(postProcessor):
    """ Restore the moved samples """
    for file in postProcessor.movedSamples[:]:
        move(os.path.join(postProcessor.dirName, Hellanzb.PROCESSED_SUBDIR, file),
             os.path.join(postProcessor.dirName, file))