Python Tutorial: OS Module – Use Underlying Operating System Functionality

///Python Tutorial: OS Module – Use Underlying Operating System Functionality

Python Tutorial: OS Module – Use Underlying Operating System Functionality

FavoriteLoadingAdd to favorites

In this Python Tutorial, we will be going over the ‘os’ module. The os module allows us to access functionality of the underlying operating system. So we can perform tasks such as: navigate the file system, obtain file information, rename files, search directory trees, fetch environment variables, and many other operations. We will cover a lot of what the os module has to offer in this tutorial, so let’s get started.

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Python

source

By |2019-09-18T22:53:35+00:00September 18th, 2019|Python Video Tutorials|31 Comments

31 Comments

  1. The Ghost September 18, 2019 at 10:53 pm - Reply

    how can i go back 1 Directory?

  2. Sonali Saha September 18, 2019 at 10:53 pm - Reply

    In one occasion os.path.splitext() didn't split the files in list directory as expected. It created a null string in place of the root and then the entire filename with extension as the second string. Searching for the reason.

  3. cptstubing September 18, 2019 at 10:53 pm - Reply

    Duurrr!

  4. Dennis Will September 18, 2019 at 10:53 pm - Reply

    Great video, Corey!

  5. farmakoxeris September 18, 2019 at 10:53 pm - Reply

    7:39 What about doing it manually? What is the meaning of the number 1459929315.0? I suppose it's a number if seconds beyond a base date/time (perhaps 1/1/1900 00:00:00).

  6. Joe Bingham September 18, 2019 at 10:53 pm - Reply

    Great stuff, but some of your instructions are only good for Mac's…. it takes me awhile to figure out the PC variant or even if it exists….Like the HOME directory. Does not exist on PC…

  7. yomajo September 18, 2019 at 10:53 pm - Reply

    I never read your descriptions, but after seeing what's on your amazons' wish list, I can tell, you aint no ordinary tutor. Respect. Sharp, evolving mind.

  8. Xuan Phung September 18, 2019 at 10:53 pm - Reply

    What a useful tutorial. Thanks a lot for sharing ^^

  9. Anindya Bhattacharya September 18, 2019 at 10:53 pm - Reply

    you have taken us through "os" module and it's great. How can I get to know how to use other modules, which are unknown to me?How can I know which function of the module takes how many arguments , what it return, what is the returned datatype and all? Like you demonstrated "os.walk" it quite a complex one to use, question is how can I use them on my own for unknown or unused modules ?

  10. Arun Kumar September 18, 2019 at 10:53 pm - Reply

    Superb Corey. You are going beyond of our expectations. Keep it up.

  11. Carolina hiker September 18, 2019 at 10:53 pm - Reply

    VERY nice work! Can you tell us what IDE you're using? I like the "command completion" feature. I'll be making a donation. Keep up the great work!

  12. rakesh sahni September 18, 2019 at 10:53 pm - Reply

    In your next videos

  13. rakesh sahni September 18, 2019 at 10:53 pm - Reply

    Can you please zoom in little as it is not visible what are you writing

  14. laierr September 18, 2019 at 10:53 pm - Reply

    3:05 OS dot make DUURR

  15. Cir Diam September 18, 2019 at 10:53 pm - Reply

    Corey – I really like your Python videos but they are a pain to watch as they keep crashing my AppleTV. It happens consistently with each of the over 10 videos of yours I have watched, but doesn’t happen on any of the hundred plus videos I’ve watched over the years in other channels. I’ve even tried screen sharing from my iphone to AppleTV- seems to help a bit – but still happens. Just FYI.

  16. AllomerusMusic September 18, 2019 at 10:53 pm - Reply

    This is great. Even works on iPad to show structure!

  17. Oszi September 18, 2019 at 10:53 pm - Reply

    nice dude

  18. Oszi September 18, 2019 at 10:53 pm - Reply

    my enviroment for Home is: none XDXDXD

  19. Yusuf Parvez September 18, 2019 at 10:53 pm - Reply

    Which IDE you are using?

  20. Felipe September 18, 2019 at 10:53 pm - Reply

    Thanks Corey !

  21. manjsc September 18, 2019 at 10:53 pm - Reply

    Really informative and very well explained. Thank you

  22. Stan Vanillo September 18, 2019 at 10:53 pm - Reply

    They took our drrrss.

  23. Luis Rosales September 18, 2019 at 10:53 pm - Reply

    Great tutorial. Simple and straight.

  24. Not a pewdiepie bot September 18, 2019 at 10:53 pm - Reply

    How would I create a main directory, and then multiple sub directories (No other sub directories in the sub directories, all directly through the main directory) inside that main directory in the same line of code?

  25. Kian Milani September 18, 2019 at 10:53 pm - Reply

    Please make a video on glob module

  26. Samantha R. September 18, 2019 at 10:53 pm - Reply

    Can you make some videos going into using API's in Python such as Googles API's.

    Love your videos! Thanks!

  27. Kirill Bezzubkine September 18, 2019 at 10:53 pm - Reply

    perfect

  28. Shaz Flicks September 18, 2019 at 10:53 pm - Reply

    now I understand this OS & good use case for file manipulation!
    THANK YOU COREY!

  29. saurav Sunil September 18, 2019 at 10:53 pm - Reply

    Bro how to make a code for root permission and automatically get root permission (root password is give in code)

  30. Vit Hopeman September 18, 2019 at 10:53 pm - Reply

    from Corey_Schafer import *
    Thanks so mich for all your great tutorials!

  31. Mg September 18, 2019 at 10:53 pm - Reply

    nice overview, a video on subprocess and process management along with os would be super helpful

Leave A Comment

*