The Real Python Podcast cover image

Package Python Code With pyproject.toml & Listing Files With pathlib

The Real Python Podcast

00:00

How to Get a List of All Files in a Directory With Python

The article focuses on using pathlib. You're still using the OS module for doing path like stuff in Python. If you're using a more recent version than I think it's Python three four when this was introduced, you should switch to pathlib. It's a superior library and treats paths as objects rather than as pure strings.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app