because this scheme uses shell command lines to start python programsall the usual shell syntax applies for instanceyou can route the printed output of python script to file to save it for later use or inspection by using special shell syntaxpython script py saveit txt in this casethe three output lines shown in the prior run are stored in the file saveit txt instead of being printed this is generally known as stream redirectionit works for input and output text and is available on windows and unix-like systems this is nice for testingas you can write programs that watch for changes in other programsoutputs it also has little to do with pythonthough (python simply supports it)so we will skip further details on shell redirection syntax here if you are working on windows platformthis example works the samebut the system prompt is normally different as described earlierc:\codepython script py win spam!spam!spam!spam!spam!spam!spam!spamas usualif you haven' set your path environment variable to include the full directory path to pythonbe sure to include this in your commandor run change-directory command to go to the path firstc:\codec:\python \python script py win spam!spam!spam!spam!spam!spam!spam!spamalternativelyif you're using the windows launcher new in python (described earlier) py command will have the same effectbut does not require directory path or path settingsand allows you to specify python version numbers on the command line tooc:\codepy - script py win spam!spam!spam!spam!spam!spam!spam!spamon all recent versions of windowsyou can also type just the name of your scriptand omit the name of python itself because newer windows systems use the windows registry ( filename associationsto find program with which to run fileyou don' need to name "pythonor "pyon the command line explicitly to run py file the prior commandfor examplecould be simplified to the following on most windows machinesand will automatically be run by python prior to and by py in and later--just as though you had clicked on the file' icon in explorer (more on this option ahead) :\codescript py system command lines and files