Working With Files in Python

I completed the basic-level tutorial “Working With Files in Python” by Vuyisile Ndlovu at Real Python. In this tutorial I learned about: • Create single and multiple files using context manager or Bash commands • Creating single or multiple directories by using various options like os.mkdir(), pathlib.Path.mkdir() or os.makedirs() or use use Bash commands • Getting directories list through os.listdir(), os.scandir(), or pathlib.Path() • List all files or all subdirectories through os.listdir(), os.scandir(), or pathlib.Path() • Filename patter matching using fmatch module or glob • Traversing directories and procesing files • Getting file attributes through os.stat(), os.scandir(), or pathlib.Path() • Create temporary files or directories • Move, copying and delete files of directories • Create, read, retrieve ZIP, TAR files. Or use SHUTIL You can find this tutorial at https://realpython.com/working-with-files-in-python/

Our Sidebar

You can put any information here you'd like.

  • Latest Posts
  • Announcements
  • Calendars
  • etc