12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When installed on Windows, <strong>Python</strong> also automatically registers itself to be theprogram that opens <strong>Python</strong> files when their icons are clicked (a program launchtechnique described in Chapter 3). It is also possible to build <strong>Python</strong> from itssource code on Windows, but this is not commonly done.One note for Windows Vista users: security features of the current version ofVista change some of the rules for using MSI installer files. See the sidebar “The<strong>Python</strong> 2.5 MSI Installer on Windows Vista” in this appendix for assistance ifthe current <strong>Python</strong> installer does not work, or does not place <strong>Python</strong> in the correctplace on your machine.LinuxOn Linux, <strong>Python</strong> is available as one or more RPM files, which you unpack inthe usual way (consult the RPM manpage for details). Depending on whichRPMs you download, there may be one for <strong>Python</strong> itself, and another that addssupport for Tkinter GU<strong>Is</strong> and the IDLE environment. Because Linux is a Unixlikesystem, the next paragraph applies as well.UnixOn Unix systems, <strong>Python</strong> is usually compiled from its full C source code distribution.This usually only requires unpacking the file, and running simple configand make commands; <strong>Python</strong> configures its own build procedure automatically,according to the system on which it is being compiled. However, be sure to seethe package’s README file for more details on this process. Because <strong>Python</strong> isopen source, its source code may be used and distributed free of charge.On other platforms, these details can differ widely; installing the “Pippy” port of<strong>Python</strong> for PalmOS, for example, requires a hotsync operation with your PDA, and<strong>Python</strong> for the Sharp Zaurus Linux-based PDA comes as one or more .ipk files,which you simply run to install. Because additional install procedures for both executableand source forms are well documented, though, we’ll skip further detailshere.Configuring <strong>Python</strong>After you’ve installed <strong>Python</strong>, you may want to configure some system settings thatimpact the way <strong>Python</strong> runs your code. (If you are just getting started with the language,you can probably skip this section completely; there is usually no need tomake any system settings for basic programs.)Generally speaking, parts of the <strong>Python</strong> interpreter’s behavior can be configured withenvironment variable settings and command-line options. In this section, we’ll take abrief look at <strong>Python</strong> environment variables. <strong>Python</strong> command-line options, whichare listed when you launch a <strong>Python</strong> program from a system prompt, are used morerarely, and have very specialized roles; see other documentation sources for details.Configuring <strong>Python</strong> | 641

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!