parsing command-line arguments shell environment variables fetching shell variables changing shell variables shell variable fine pointsparentsputenvand getenv standard streams redirecting streams to files and programs redirected streams and user interaction redirecting streams to python objects the io stringio and io bytesio utility classes capturing the stderr stream redirection syntax in print calls other redirection optionsos popen and subprocess revisited file and directory tools "erase your hard drive in five easy steps!file tools the file object model in python using built-in file objects binary and text files lower-level file tools in the os module file scanners directory tools walking one directory walking directory trees handling unicode filenames in xlistdirwalkglob parallel system tools "telling the monkeys what to doforking processes the fork/exec combination threads the _thread module the threading module the queue module previewguis and threads more on the global interpreter lock program exits sys module exits os module exits shell command exit status codes process exit status and shared state table of contents vii