The Python installation folder
In this section, we will discuss the structure of the Python installation directory, to better understand its purpose and how to take advantage of it. On Windows, Python installs itself in the root of the C:\
directory in the Python27
folder. If multiple versions of Python exist on the system, Python 2.7 is installed in the C:\Python\2.7
folder. Other numbered versions of Python would exist under the C:\Python
folder.
Within the installation directory, there are a number of folders and files. Notably, the python.exe
and pythonw.exe
executables exist within the directory. The pythonw.exe
executable is the same as python.exe
with the exception that a terminal window does not appear when running a script. We might, for example, use pythonw.exe
when running a GUI-based Python script where we do not need to see a terminal because all interaction happens within the GUI.
Let's now discuss the contents and purpose of the directories in the Python installation...