Many commercial programs, such as WinZip (http://www.winzip.com) and PowerArchiver
(http://www.powerarchiver.com), can also uncompress and unpack .tgz archives (and .tar.bz2 ones too).
Whether via gunzip and tar, a commercial program, or some other program, you now have a directory
C:\Py\Python-2.4.3, the root of a tree that contains the entire standard Python distribution in source form.
2.1.1.2. Building the Python source code with Microsoft Visual Studio 2003
Open the workspace file C:\Py\Python-2.4.3\PCbuild\pcbuild.dsw with Microsoft Visual Studiofor example,
by starting Windows Explorer, going to directory C:\Py\Python-2.4.3\PCbuild, and double-clicking on file
pcbuild.dsw.
Choose Build Set Active Configuration python Win32 Release, and then choose Build Build
python.exe. Visual Studio builds projects pythoncore and python, making files python24.dll and python.exe in
C:\Py\Python-2.4.3\PCbuild. You can also build other subprojects (for example, with Build Batch
Build...). To build subprojects _tkinter, bsddb, pyexpat, and zlib, you first need to download other open source
packages and install them in the C:\Py directory. Follow the instructions in
C:\Py\Python-2.4.3\PCbuild\readme.txt to build every Python package that is in the distribution.
2.1.1.3. Building Python for debugging
You can also, optionally, build the debug versions, as well as the release versions, of the Python packages.
With Visual Studio, an executable (.exe) built for release can interoperate fully only with dynamic load
libraries (DLLs) also built for release, while an executable built for debugging interoperates fully only with
DLLs also built for debugging. Trying to mix and match can cause program crashes and assorted strangeness.
To help you avoid accidentally mixing parts built for release with others built for debugging, the Python
workspace appends a _d to the name of debugging executables and DLLs. For example, when you build for
debugging, project pythoncore produces python24_d.dll and project python produces python24_d.exe.
What makes the debugging and release Visual Studio builds incompatible is the choice of C runtime library.
Executables and DLLs can fully interoperate only by using the same C runtime library, and the runtime library
must in turn be a DLL. You can tweak Project Settings C/C++ Code Generation Use
run-time library, setting all projects to use Multithreaded DLL (MSVCRT.DLL) (also remove the _DEBUG
definition in C/C++ Code Generation Preprocessor). I recommend you follow this approach only if
you are highly experienced with Microsoft Visual Studio and have special, advanced requirements. Otherwise,
resign yourself to keeping two separate and distinct release and debugging "worlds"; this is, by far, the
simplest approach on Windows.
2.1.1.4. Installing after the build
python24.dll (or python24_d.dll if you want to run a debug-mode python_d.exe) must be in a directory from
which Windows loads DLLs when needed. Suitable directories depend on your version of Windows; for
example, c:\windows\system is one possibility. If you don't copy python24.dll to such a suitable directory, you
can run Python only when the current directory is the directory in which python24.dll resides.
Similarly, python.exe must be in a directory in which Windows looks for executables, normally a directory
listed in the Windows environment variable named PATH. How to set PATH and other environment variables
depends on your version of Windows, as mentioned in "Environment Variables" on page 22. Python can
locate other files, such as the standard library modules, according to various strategies.
C:\Py\Python-2.4.3\PC\readme.txt documents the various possibilities.
Part I: Getting Started with Python 11
Part I: Getting Started with Python 11