home/exp1000/acquire_and_label_images.py
def cleanup(self):
        """Delete files created on the project's root directory while processing the acquired image.

        These files could exist due to an unhandled error during a previous run so as a precaution 
        we also run this function prior to image acquisition.
        """

        # Count the number of files deleted.
        delete_count = 0

        # Loop through all the file types to delete.
        for ext in ['ims_rgb', 'png', 'jpeg', 'tar', 'tar.gz']:

            # Get a list of all the file paths that ends with .txt from in specified directory
            img_files = glob.glob(BASE_PATH + "/*." + ext)

            for f in img_files:
                try:
                    os.remove(f)
                    delete_count = delete_count + 1
                    logger.info("Removed file: " + f)

                except:
                    logger.error("Error removing file: " + f)
                    return -1

        return delete_count
Delete files created on the project's root directory while processing the acquired image.

        These files could exist due to an unhandled error during a previous run so as a precaution 
        we also run this function prior to image acquisition.
        
Delete files created on the project's root directory while processing the acquired image.
These files could exist due to an unhandled error during a previous run so as a precaution
we also run this function prior to image acquisition.
Delete files created on the project ' s root directory while processing the acquired image . These files could exist due to an unhandled error during a previous run so as a precaution we also run this function prior to image acquisition .
def cleanup(self):
        delete_count = 0
        for ext in ['ims_rgb', 'png', 'jpeg', 'tar', 'tar.gz']:
            img_files = glob.glob(BASE_PATH + "/*." + ext)
            for f in img_files:
                try:
                    os.remove(f)
                    delete_count = delete_count + 1
                    logger.info("Removed file: " + f)
                except:
                    logger.error("Error removing file: " + f)
                    return -1
        return delete_count
def cleanup ( self ) : delete_count = 0 for ext in [ 'ims_rgb' , 'png' , 'jpeg' , 'tar' , 'tar.gz' ] : img_files = glob . glob ( BASE_PATH + "/*." + ext ) for f in img_files : try : os . remove ( f ) delete_count = delete_count + 1 logger . info ( "Removed file: " + f ) except : logger . error ( "Error removing file: " + f ) return - 1 return delete_count
Delete files created on the project's root directory while processing the acquired image.
Delete files created on the project ' s root directory while processing the acquired image .
"""Delete files created on the project's root directory while processing the acquired image.

        These files could exist due to an unhandled error during a previous run so as a precaution 
        we also run this function prior to image acquisition.
        """ # Count the number of files deleted. # Loop through all the file types to delete. # Get a list of all the file paths that ends with .txt from in specified directory
self