Whats the different between os , sys and subprocess module in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 14

Whats the different between os , sys and subprocess module in python?

10th Jun 2021, 11:45 AM
aspad🇮🇷
aspad🇮🇷 - avatar
2 Answers
+ 4
read the f*****g documentation: https://docs.python.org/3/library/os.html https://docs.python.org/3/library/sys.html https://docs.python.org/3/library/subprocess.html
10th Jun 2021, 2:00 PM
visph
visph - avatar
+ 1
OS - The OS module in Python provides functions for interacting with the operating system. OS comes under Python's standard utility modules. This module provides a portable way of using operating system dependent functionality. ... path* modules include many functions to interact with the file system. Sys - The sys module in Python provides various functions and variables that are used to manipulate different parts of the Python runtime environment. It allows operating on the interpreter as it provides access to the variables and functions that interact strongly with the interpreter. Subprocess - The subprocess module present in Python(both 2. x and 3. x) is used to run new applications or programs through Python code by creating new processes. It also helps to obtain the input/output/error pipes as well as the exit codes of various commands. You will get more information on Geeks for Geeks and from Python's officail site CRDITS - geeksforgeeks Enjoy Sololeaening 🙂
10th Jun 2021, 12:00 PM
Abhiyantā
Abhiyantā - avatar