F U Python Commands
The previous post was for commands Unix. This post is about the Python commands I use or Google frequently. To find the absolute path of the directory of the current file being executed - abs_path = os.path.dirname(os.path.realpath(file)) To copy a file from source to destination (using shutil)- from shutil import copyfile copyfile(src, dst) To copy a file or directory from source to destination (using shutil)- from shutil import copy copy(src, dst) ...