script execution context " ' like to have an argumentpleasepython scripts don' run in vacuum (despite what you may have hearddepending on platforms and startup procedurespython programs may have all sorts of enclosing context--information automatically passed in to the program by the operating system when the program starts up for instancescripts have access to the following sorts of system-level inputs and interfacescurrent working directory os getcwd gives access to the directory from which script is startedand many file tools use its value implicitly command-line arguments sys argv gives access to words typed on the command line that are used to start the program and that serve as script inputs shell variables os environ provides an interface to names assigned in the enclosing shell (or parent programand passed in to the script standard streams sys stdinstdoutand stderr export the three input/output streams that are at the heart of command-line shell toolsand can be leveraged by scripts with print optionsthe os popen call and subprocess module introduced in the io stringio classand more such tools can serve as inputs to scriptsconfiguration parametersand so on in this we will explore all these four context' tools--both their python interfaces and their typical roles