(and not bothprevents us from catching the second script' output in our codeimport os os popen('python writer py'' ' os popen('python reader py'' ' writep read( close(got this"helphelpi' being repressed!the meaning of life is print(xnone from the broader perspectivethe os popen call and subprocess module are python' portable equivalents of unix-like shell syntax for redirecting the streams of spawned programs the python versions also work on windowsthoughand are the most platform-neutral way to launch another program from python script the commandline strings you pass to them may vary per platform ( directory listing requires an ls on unix but dir on windows)but the call itself works on all major python platforms on unix-like platformsthe combination of the calls os forkos pipeos dupand some os exec variants can also be used to start new independent program with streams connected to the parent program' streams as suchit' yet another way to redirect streams and low-level equivalent to tools such as os popen (os fork is available in cygwin' python on windowssince these are all more advanced parallel processing toolsthoughwe'll defer further details on this front until especially its coverage of pipes and exit status codes and we'll resurrect subprocess again in to code regression tester that intercepts all three standard streams of spawned test scripts--inputsoutputsand errors but first continues our survey of python system interfaces by exploring the tools available for processing files and directories although we'll be shifting focus somewhatwe'll find that some of what we've learned here will already begin to come in handy as general system-related tools spawning shell commandsfor instanceprovides ways to inspect directoriesand the file interface we will expand on in the next is at the heart of the stream processing techniques we have studied here script execution context