Skip to Content
The Quick Python Book, Third Edition
book

The Quick Python Book, Third Edition

by Naomi Ceder, David Fugate
May 2018
Beginner
472 pages
15h 3m
English
Manning Publications
Content preview from The Quick Python Book, Third Edition

Chapter 12. Using the filesystem

This chapter covers

  • Managing paths and pathnames
  • Getting information about files
  • Performing filesystem operations
  • Processing all files in a directory subtree

Working with files involves one of two things: basic I/O (described in chapter 13, Reading and writing files”) and working with the filesystem (for example, naming, creating, moving, or referring to files), which is a bit tricky, because different operating systems have different filesystem conventions.

It would be easy enough to learn how to perform basic file I/O without learning all the features Python has provided to simplify cross-platform filesystem interaction—but I wouldn’t recommend it. Instead, read at least the first part of this chapter, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Think Python, 3rd Edition

Think Python, 3rd Edition

Allen Downey
Learn Python Programming - Third Edition

Learn Python Programming - Third Edition

Fabrizio Romano, Heinrich Kruger

Publisher Resources

ISBN: 9781617294037Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link