def init_output_directories(self): output_directory = self.output_directory or self.get_default_output_directory() file_name = self.file_name or self.get_default_file_name() if self.save_last_frame: image_dir = guarantee_existance(os.path.join( VIDEO_DIR, output_directory, self.get_image_directory(), )) self.image_file_path = os.path.join( image_dir, add_extension_if_not_present(file_name, ".png") ) if self.write_to_movie: movie_dir = guarantee_existance(os.path.join( VIDEO_DIR, output_directory, self.get_movie_directory(), )) self.movie_file_path = os.path.join( movie_dir, add_extension_if_not_present( file_name, self.movie_file_extension ) ) self.partial_movie_directory = guarantee_existance(os.path.join( movie_dir, self.get_partial_movie_directory(), file_name, ))
def init_output_directories(self): output_directory = self.output_directory or self.get_default_output_directory( ) file_name = self.file_name or self.get_default_file_name() if self.save_last_frame: image_dir = guarantee_existance( os.path.join( VIDEO_DIR, output_directory, self.get_image_directory(), )) self.image_file_path = os.path.join( image_dir, add_extension_if_not_present(file_name, ".png")) if self.write_to_movie: movie_dir = guarantee_existance( os.path.join( VIDEO_DIR, output_directory, self.get_movie_directory(), )) self.movie_file_path = os.path.join( movie_dir, add_extension_if_not_present(file_name, self.movie_file_extension)) self.partial_movie_directory = guarantee_existance( os.path.join( movie_dir, self.get_partial_movie_directory(), file_name, ))