Join Joe Marini for an in-depth discussion in this video Working with OS path utilities, part of Up and Running with Python.
Sometimes you need to do some work with files that goes beyond things like reading…and writing data. You need to find out information about the…file, whether it exists, what the path of the file is, whether a path is a file or a…directory and so on, and Python provides path related utilities to help you do…this, and that's what we are going to look at in this particular movie.…So, let's go over chapter four and open up ospathutils_start.py.…And then from the snippets let's do something really simple just to begin with.…Let's copy this line here import os. And we'll paste that in here, and then…let's copy in this line of text right here that just prints the name of the os.…
Okay, so I'm importing the OS or Operating System Module from Python into this…example, and let's just run what we have right now.…So I click Run, go choose Python Run, so I run it.…And you can see that I'm printing out the letters nt so I'm running Windows eight…here and the OS name as far as programmers are concerned is nt.…Now you might see a different name based on what kind of computer you're using, if…
- Installing Python
- Choosing an editor/IDE
- Working with variables and expressions
- Writing loops
- Using the date, time, and datetime classes
- Reading and writing files
- Fetching Internet data
- Parsing and processing HTML
Skill Level Beginner
1. Preparing the Development Environment
2. Python Basics
3. Working with Dates and Times
4. Working with Files
5. Working with Web Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.