this file is runthe operating system sends lines in this file to the interpreter listed after #in line if this file is made directly executable with shell command of the form chmod + myscriptit can be run directly without typing python in the commandas though it were binary executable programmyscript and nice red uniforms when run this waysys argv will still have the script' name as the first word in the list["myscript"" "" "" "]exactly as if the script had been run with the more explicit and portable command form python myscript making scripts directly executable is actually unix tricknot python featurebut it' worth pointing out that it can be made bit less machine dependent by listing the unix env command at the top instead of hardcoded path to the python executable#!/usr/bin/env python print('wait for it 'when coded this waythe operating system will employ your environment variable settings to locate your python interpreter (your path variableon most platformsif you run the same script on many machinesyou need only change your environment settings on each machine (you don' need to edit python script codeof courseyou can always run python files with more explicit command linepython myscript this assumes that the python interpreter program is on your system' search path setting (otherwiseyou need to type its full path)but it works on any python platform with command line since this is more portablei generally use this convention in the book' examplesbut consult your unix manpages for more details on any of the topics mentioned here even sothese special #lines will show up in many examples in this book just in case readers want to run them as executables on unix or linuxon other platformsthey are simply ignored as python comments note that on recent flavors of windowsyou can usually also type script' filename directly (without the word pythonto make it goand you don' have to add #line at the top python uses the windows registry on this platform to declare itself as the program that opens files with python extensions py and othersthis is also why you can launch files on windows by clicking on them shell environment variables shell variablessometimes known as environment variablesare made available to python scripts as os environa python dictionary-like object with one entry per variable setting in the shell shell variables live outside the python systemthey are often set at your system prompt or within startup files or control-panel guis and typically serve as system-wide configuration inputs to programs shell environment variables