creates new named pipe os stat fetches low-level file information os remove deletes file by its pathname os walk applies function or loop body to all parts of an entire directory tree and so on one caution up frontthe os module provides set of file openreadand write callsbut all of these deal with low-level file access and are entirely distinct from python' built-in stdio file objects that we create with the built-in open function you should normally use the built-in open functionnot the os modulefor all but very special file-processing needs ( opening with exclusive access file lockingin the next we will apply sys and os tools such as those we've introduced here to implement common system-level tasksbut this book doesn' have space to provide an exhaustive list of the contents of modules we will meet along the way againif you have not already done soyou should become acquainted with the contents of modules such as os and sys using the resources described earlier for nowlet' move on to explore additional system tools in the context of broader system programming concepts--the context surrounding running script subprocessos popenand iterators in we'll explore file iteratorsbut you've probably already studied the basics prior to picking up this book because os popen objects have an iterator that reads one line at timetheir readlines method call is usually superfluous for examplethe following steps through lines produced by another program without any explicit readsimport os for line in os popen('dir / py')print(lineend=''helloshell py more py __init__ py interestinglypython implements os popen using the subprocess popen object that we studied in this you can see this for yourself in file os py in the python standard library on your machine (see :\python \lib on windows)the os popen result is an object that manages the popen object and its piped streami os popen('dir / py' because this pipe wrapper object defines an __iter__ methodit supports line iterationboth automatic ( the for loop aboveand manual curiouslyalthough the pipe wrapper object supports direct __next__ method calls as though it were its own iterator introducing the os module