Movatterモバイル変換


[0]ホーム

URL:


Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only.Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Using Python's pathlib Module (Summary)

Since Python 3.4,pathlib has been available in the standard library. Withpathlib, file paths can be represented by properPath objects instead of plain strings as before. These objects make code dealing with file paths:

  • Easier to read, especially because/ is used to join paths together
  • More powerful, with most necessary methods and properties available directly on the object
  • More consistent across operating systems, as peculiarities of the different systems are hidden by thePath object

In this video course, you’ve seen how to createPath objects, read and write files, manipulate paths and the underlying file system, as well as some examples of how to iterate over many file paths.

To learn more aboutpathlib, check out:

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member?Sign-In

Locked learning resources

The full lesson is for members only.Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member?Sign-In

Avatar image for east4ming

east4ming onDec. 28, 2022

Need sample codes in this lesson.Thanks!

Avatar image for Darren Jones

Darren Jones onJan. 4, 2023

@east4ming - Generally we don’t provide code for REPL sessions (as it’s not something you’d generally run in the same way you might a python script), but it’s something I’ll discuss further with the team. Thanks for reaching out.

Become a Member to join the conversation.

Course Contents

Overview
100%

[8]ページ先頭

©2009-2026 Movatter.jp