stouputils.io package#
This module provides utilities for file management.
json_dump(): Writes the provided data to a JSON file with a specified indentation depth.json_load(): Load a JSON file from the given pathcsv_dump(): Writes data to a CSV file with customizable optionscsv_load(): Load a CSV file from the given pathget_root_path(): Get the absolute path of the directoryrelative_path(): Get the relative path of a file relative to a given directorysuper_copy(): Copy a file (or a folder) from the source to the destination (always create the directory)super_open(): Open a file with the given mode, creating the directory if it doesn’t exist (only if writing)replace_tilde(): Replace the “~” by the user’s home directoryclean_path(): Clean the path by replacing backslashes with forward slashes and simplifying the pathcopytree_with_progress(): Copy a directory tree with a colored progress barredirect_folder(): Move a folder and create a junction/symlink at the original locationsafe_close(): Safely close a file descriptor or file object after flushing, ignoring any exceptions