Wednesday, October 13, 2021

Inspired Python: Common Path Patterns

Common Path Patterns

The pathlib module, introduced in Python 3.4, added a class-based approach to Path and file management. Most users of Path never venture beyond the basics of joining paths together. That’s a shame as the motivations behind the pathlib module is to serve as more than just a replacement for the myriad functions in os and os.path.

Let’s take a look at some of the more useful parts of pathlib.



Read More ->

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...