课程: Python Essential Libraries
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Working with files
- [Instructor] We're going to begin our investigation of PyFilesystem with a pretty logical place to start. And that's working with files. There are a couple of different ways of working with file system using this library. And I'm going to cover the most common way. And you can see here I have the documentation up for PyFilesystem. And you can have this up and refer to it as we go along. Or you can read it later at your own pace. So we'll refer back to it a little bit, but for the moment, let's go ahead over to Visual Studio Code, or to your editor and go ahead and open up the basicfiles_start.py file. So to open a file system, we simply need to import the type of file system that we want to use. And you can see here at the top of my code, I've imported an OS FileSystem from the library. Now there are other types, like zip files and cloud providers, but this one lets you work with local files. So then you just need to…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。