Getting Your Own Copy of Python
In This Chapter
▶ Obtaining a copy of Python for your system
▶ Performing the Python installation
▶ Finding and using Python on your system
▶ Ensuring your installation works as planned
reating applications requires that you have another application, unless you really want to get low level and write applications in machine
code — a decidedly difficult experience that even true programmers avoid if at all possible. If you want to write an application using the Python pro- gramming language, you need the applications required to do so. These applications help you work with Python by creating Python code, providing help information as you need it, and letting you run the code you write. This chapter helps you obtain a copy of the Python application, install it on your hard drive, locate the installed applications so that you can use them, and test your installation so that you can see how it works.
Downloading the Version You Need
Every platform (combination of computer hardware and operating system software) has special rules that it follows when running applications. The Python application hides these details from you. You type code that runs on any platform that Python supports, and the Python applications translate that code into something the platform can understand. However, in order for the translation to take place, you must have a version of Python that works on your particular platform. Python supports these platforms:
- Advanced IBM Unix (AIX)
- Amiga Research OS (AROS)
- Application System 400 (AS/400)
- Hewlett-Packard Unix (HP-UX)
- Mac OS X (comes pre-installed with the OS)
- Microsoft Disk Operating System (MS-DOS)
- Operating System 2 (OS/2)
- Operating System 390 (OS/390) and z/OS
- RISC OS (originally Acorn)
- Series 60
- Virtual Memory System (VMS)
- Windows 32-bit (XP and later)
- Windows 64-bit
- Windows CE/Pocket PC
Wow, that’s a lot of different platforms! This book is tested with the Windows, Mac OS X, and Linux platforms. However, the examples could very well work with these other platforms, too, because the examples don’t rely on any platform-specific code. Let me know if it works on your non-Windows, Mac, or Linux platform at John@JohnMuellerBooks.com. The current version of Python at the time of this writing is 3.3.4. I’ll talk about any Python updates on my blog at http://blog.johnmuellerbooks.com. You can find the answers to your Python book-specific questions there, too.
To get the right version for your platform, you need to go to http://www. python.org/download/releases/3.3.4/. The download section is ini- tially hidden from view, so you need to scroll halfway down the page. You see a page similar to the one shown in Figure 2-1. The main part of the page con- tains links for Windows, Mac OS X, and Linux downloads. These links provide
you with the default setup that is used in this book. The platform-specific links on the left side of the page show you alternative Python configurations that you can use when the need arises. For example, you may want to use a more advanced editor than the one provided with the default Python pack- age, and these alternative configurations can provide one for you.
Figure 2-1: The Python download page con tains links for all sorts of versions.
If you want to work with another platform, click the Other link on the left side of the page. You see a list of Python installations for other platforms, as shown in Figure 2-2. Many of these installations are maintained by volunteers rather than by the people who create the versions of Python for Windows,
Mac OS X, and Linux. Make sure you contact these individuals when you have installation questions because they know how best to help you get a good installation on your platform.
Figure 2-2: Volunteers have made
Python available on all sorts of platforms.