Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
160 Days of DSA (Win T-Shirt!)
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
Sign In
▲
Similar Topics
Python
20.1k+ articles
Python Programs
4.1k+ articles
python-utility
670+ articles
python-modules
380+ articles
Python-tkinter
340+ articles
python-file-handling
110+ articles
Python file-handling-programs
82 articles
Python OS-path-module
32 articles
Python os-module-programs
28 articles
Python directory-program
26 articles
python-os-module
210+ posts
Popular Articles
Recent Articles
Find path to the given file using Python
Last Updated: 02 August 2024
We can get the location (path) of the running script file .py with __file__. __file__ is useful for reading other files and it gives the cur
...read more
Technical Scripter
Python
Picked
python-os-module
Technical Scripter 2020
Create a directory in Python
Last Updated: 08 October 2024
In Python, you can create directories to store and manage your data efficiently. This capability is particularly useful when building applic
...read more
Python
python-file-handling
python-os-module
Python file-handling-programs
Python os-module-programs
Python | os.path.basename() method
Last Updated: 21 August 2024
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This m
...read more
Python
python-os-module
Python OS-path-module
Similar Topics
Python
20.1k+ articles
Python Programs
4.1k+ articles
python-utility
670+ articles
python-modules
380+ articles
Python-tkinter
340+ articles
python-file-handling
110+ articles
Python file-handling-programs
82+ articles
Python OS-path-module
32+ articles
Python os-module-programs
28+ articles
Python directory-program
26+ articles
Python | os.system() method
Last Updated: 13 August 2024
The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. Th
...read more
Python
python-os-module
Python | os.path.join() method
Last Updated: 08 October 2024
The os.path.join() method is a function in the os module that joins one or more path components intelligently. It constructs a full path by
...read more
Python
python-os-module
Python OS-path-module
Python | os.makedirs() method
Last Updated: 15 January 2024
All functions in the os module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that have the c
...read more
Python
python-os-module
Python OS-path-module
Python | os.mkdir() method
Last Updated: 16 January 2024
All functions in the OS module raiseOSErrorin the case of invalid or inaccessible file names and paths, or other arguments that have the cor
...read more
Python
python-os-module
Python OS-path-module
Python | os.environ object
Last Updated: 06 September 2024
os.environin Python is a mapping object that represents the user’s OS environmental variables. It returns a dictionary having the user’s
...read more
Python
python-os-module
Python | os.path.split() method
Last Updated: 12 January 2024
os.path.split()method in Python is used to Split the path name into a pair,andtail. Here,the tailis the last path name component andthe head
...read more
Python
python-os-module
Python | os.path.exists() method
Last Updated: 16 January 2024
os.path.exists()method in Python is used to check whether the specified path exists or not. This method can be also used to check whether th
...read more
Python
python-os-module
Python | os.getenv() method
Last Updated: 16 January 2024
OS modulein Python provides functions for interacting with the operating system. OS comes under Python OS env standard utility modules. This
...read more
Python
python-os-module
Python | os.listdir() method
Last Updated: 16 January 2024
The os.listdir()method in Python is used to get the list of all files and directories in the specified directory. If we don’t specify any
...read more
Python
python-os-module
Python - os.chdir() method
Last Updated: 13 December 2024
os.chdir() method in Python is used to change the current working directory to the specified path. This function is part of the os module, w
...read more
Python
python-modules
python-os-module
os.walk() in Python
Last Updated: 14 March 2024
How to traverse file system in Python ? Suppose we have given below file structure in our system and we want to traverse all it's branches c
...read more
Python
Python-Library
python-modules
python-os-module
OS Module in Python with Examples
Last Updated: 01 August 2024
The OS module in Python provides functions for interacting with the operating system. OS comes under Python's standard utility modules. This
...read more
Python
python-modules
python-os-module
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !