file and directory tools "erase your hard drive in five easy steps!this continues our look at system interfaces in python by focusing on file and directory-related tools as you'll seeit' easy to process files and directory trees with python' built-in and standard library support because files are part of the core python languagesome of this material is review of file basics covered in books like learning pythonfourth editionand we'll defer to such resources for more background details on some file-related concepts for exampleiterationcontext managersand the file object' support for unicode encodings are demonstrated along the waybut these topics are not repeated in full here this goal is to tell enough of the file story to get you started writing useful scripts file tools external files are at the heart of much of what we do with system utilities for instancea testing system may read its inputs from one filestore program results in another fileand check expected results by loading yet another file even user interface and internetoriented programs may load binary images and audio clips from files on the underlying computer it' core programming concept in pythonthe built-in open function is the primary tool scripts use to access the files on the underlying computer system since this function is an inherent part of the python languageyou may already be familiar with its basic workings when calledthe open function returns new file object that is connected to the external filethe file object has methods that transfer data to and from the file and perform variety of file-related operations the open function also provides portable interface to the underlying filesystem--it works the same way on every platform on which python runs other file-related modules built into python allow us to do things such as manipulate lower-level descriptor-based files (os)copyremoveand move files and collections of files (os and shutil)store data and objects in files by key (dbm and shelve)and access