A First Script

Total Page:16

File Type:pdf, Size:1020Kb

A First Script 05 6191 ch03 11/25/03 11:59 AM Page 27 HOUR 3 A First Script What You’ll Learn in This Hour: . How to create, upload, and run a PHP script . How to incorporate HTML and PHP in the same document . How to make your code clearer with comments You installed and configured PHP in the last hour. It is now time to put it to the test. In this hour, you will create your first script and spend a little time analyzing its syn- tax. By the end of the hour, you should be ready to create documents that include both HTML and PHP. Our First Script Let’s jump right in with a PHP script. To begin, open your favorite text editor. Like HTML documents, PHP files are made up of plain text, so you can create them with any text editor, such as Notepad and HomeSite on Windows, Simple Text and BBEdit on Mac OS, or VI and Emacs on Unix operating systems. Most popular HTML editors provide at least some support for PHP. Keith Edmunds maintains a handy list of PHP-friendly editors at Did you http://phpeditors.linuxbackup.co.uk. Know? Type in the example in Listing 3.1 and save the file. We’ll name our file listing3.1.php. 05 6191 ch03 11/25/03 11:59 AM Page 28 28 Hour 3 LISTING 3.1 A First PHP Script 1: <?php 2: phpinfo(); 3: ?> The code in Listing 3.1 causes information about our PHP installation to be out- put to the browser. The phpinfo() function is very useful for debugging scripts because of the contextual information it provides. The extension to the PHP document is important because it tells the server to treat the file as PHP code and invoke the PHP engine. The default PHP extension for a PHP document is .php. This can be changed, however, by altering the server’s configuration. You saw how to do this in Hour 2, “Installing PHP.” System admin- istrators occasionally configure servers to work with non-default extensions, so some server setups might expect extensions such as .phtml or .php5. As you saw in the last hour, for example, Apache uses the AddType directive to determine how a file should be treated. AddType is usually found in Apache’s configuration file, httpd.conf: AddType application/x-httpd-php .php If you are not working directly on the machine that will be serving your PHP script, you will probably need to use an FTP client, such as WS_FTP for Windows or RBrowser Lite for MacOS, to upload your saved document to the server. Watch For historical reasons, different operating systems use different character combina- Out! tions to denote the end of a line of text. You should save your PHP documents with the correct line breaks for the operating system that runs your server. A document with the wrong line breaks for the operating system might be read as a single very long line of text by the PHP engine. This usually causes no problems, but the occa- sional bug can result. Most good text editors allow you to nominate your target oper- ating system. After the document is in place, you should be able to access it via your browser. If all has gone well, you should see the script’s output. Figure 3.1 shows the output from the listing3.1.php script. If PHP is not installed on your server or your file’s extension is not recognized, you might not see the output shown in Figure 3.1. In these cases, you might see the source code created in Listing 3.1, or you might be prompted to download the file! The effect of a misconfiguration depends your platform, server and browser. Figure 3.2 shows what happens to Internet Explorer when an unknown extension is encountered by Apache running PHP as a module on Linux. 05 6191 ch03 11/25/03 12:00 PM Page 29 A First Script 29 FIGURE 3.1 Success: The output from Listing 3.1. FIGURE 3.2 Failure: The extension is not recognized. If this happens, or you see the script’s source code in the browser window, first check the extension with which you saved your PHP script. If you are used to working with HTML files, for example, check that you have not saved your script with a .html extension. If the file extension is as it should be, you might need to check that PHP has been installed properly and that your server is configured to work with the extension you have used for your script. You can read more about installing and configuring PHP in Hour 2. To produce the output shown in Figure 3.2, we removed the AddType directive from Apache’s configuration file. 05 6191 ch03 11/25/03 12:00 PM Page 30 30 Hour 3 By the Configuration problems vary between servers and platforms. Omitting the Action Way directive from Apache’s httpd.conf file when running PHP as a CGI results in errors, for example. If you encounter unexpected behavior, you should refer to the installation instruc- tions for your server. You can find complete instructions for setting up PHP with most servers at http://www.php.net/installation. Now that you have uploaded and tested your script, you can take a look at the code in a little more detail. Beginning and Ending a Block of PHP Statements When writing PHP, you need to inform the PHP engine that you want it to exe- cute your commands. If you don’t do this, the code you write will be mistaken for HTML and will be output to the browser. You can do this with special tags that mark the beginning and end of PHP code blocks. Table 3.1 lists four such PHP delimiter tags. TABLE 3.1 PHP Start and End Tags Tag Style Start Tag End Tag Standard tags <?php ?> Short tags <? ?> ASP tags <% %> Script tags <script language=”php”> </script> Of the tags in Table 3.1, only the standard and the script tags can be guaranteed to work on any configuration. The short and ASP style tags must be explicitly enabled in your php.ini, which you examined in Hour 2. To activate recognition for short tags, you must make sure that the short_open_tag switch is set to “On” in php.ini, like so: short_open_tag = On; Short tags are enabled by default, so you need to edit php.ini only if you want to disable these. To activate recognition for the ASP tags, you must enable the asp_tags setting, like so: asp_tags = On; 05 6191 ch03 11/25/03 12:00 PM Page 31 A First Script 31 After you have edited php.ini, you should be able to choose from any of the four styles for use in your scripts. Having said this, it is not advisable to use anything but the standard <?php ?> tags. It is the officially supported syntax, it works well with XML, and it works in any PHP context. Furthermore, there is no guarantee that short tags will be supported forever. The character sequence <? tells an XML parser to expect a processing instruction: Watch <?xml version=”1.0” encoding=”UTF-8”?> Out! This syntax clashes with the PHP short tag. Used as part of an XML or XHTML docu- ment, PHP short tags could confuse an XML validator, the PHP engine, or both. Disable short tags if you intend to use PHP in an XML context. You should also avoid short or ASP tags if you want your script to be portable. Third-party servers might not be configured to support these tags. Let’s run through some of the ways in which you can legally write the code in Listing 3.1. You could use any of the four PHP start and end tags that you have seen: <? phpinfo(); ?> <?php phpinfo(); ?> <% phpinfo(); %> <script language=”php”> phpinfo(); </script> Single lines of code in PHP also can be presented on the same line as the PHP start and end tags, like so: <?php phpinfo(); ?> Now that we have proved to ourselves that PHP is working, let’s move on and write some more code. 05 6191 ch03 11/25/03 12:00 PM Page 32 32 Hour 3 The print() Function In Listing 3.1 we used the phpinfo() function. In Listing 3.2 we change our script so that we print something to the browser for ourselves. LISTING 3.2 Printing a Message 1: <?php 2: print “hello world”; 3: ?> print() is a language construct that outputs data. Although it is not a function, it behaves like one: It accepts a collection of characters, known as a string. Strings must be enclosed by quotation marks, either single or double. The string passed to print() is then output, usually to the browser or command line. By the Similar to the print() statement is echo(), which behaves in the same way (except Way that it does not return a value). For most examples in this book, you could replace all uses of print() with echo() without any noticeable effect. By the Function calls generally require parentheses after their names, regardless of whether Way they demand arguments. print() is, strictly speaking, a language construct rather than a function and does not demand the use of parentheses. As parentheses are omitted by convention, we will usually omit them in our examples. We ended our only line of code in Listing 3.2 with a semicolon. The semicolon informs the PHP engine that we have completed a statement.
Recommended publications
  • These Web Design Tools Help with Access and Aesthetics
    These Web design tools help with access and aesthetics Company Product name Platform Notes Price Adobe Systems Inc. GoLive Windows, Mac Dynamic content Web design and site management package $499 San Jose, Calif. 800-833-6687 www.adobe.com Agile Compware Ltd. Agile Color Web Win95 up Shows how colors will appear in different browsers and monitors $10 Cambridge, U.K. www.agilie.com Apache Software Foundation PHP Linux, Mac General purpose server scripting language Free www.php.net Bare Bones Software Inc. BBEdit Mac Robust text-based Web page editor $119 Bedford, Mass. 781-687-0700 www.barebones.com Freecode HTP Windows, Unix Preprocessor Free www.freecode.com/ projects/htp iMatix Corp. HTMLpp MS-DOS, Preprocessor Free Brussels, Belgium Windows, www.imatix.com Unix Labyrinth Ppwizard MS-DOS, HTML preprocessor Free www.labyrinth.net.au/ Windows, BeOS, ~dbareis/ppwizard.htm Linux, OS/2 Macromedia Inc. HomeSite Windows Web site editor, with Dreamweaver $30 San Francisco 415-252-2000 Dreamweaver Fireworks Studio Windows, Mac High-end graphics and HTML editor $399 www.macromedia.com Macromedia Solutions Kit Windows 2 CD set includes design guides and templates Free 508 Accessibility Suite Windows, Mac Extensions for Dreamweaver Free Dreamweaver Accessibility Templates Windows, Mac Shows one way to reach 508 compliance Free Media Design in Progress Interaction Mac Web server companion helps automate updates; works with Mac, $795 Coronado, Calif. HTTP, WebServer 4D, Web-ten, Quid Pro Quo and WebStar 619-437-0664 interaction.in-progress.com Cascade Mac Cascading style sheet editor; lets you tailor sites for different visitors $69 Xpublish Mac For medium to large Web sites; uses CSS and XML $495 Sausage Software HotDog Professional Windows Editor supports HTML, CSS, ASP, PHP, VBScript, JavaScript $100 Southbank, Victoria, Australia 61-3-8696-6128 www.sausage.com/ Shadi-Soft Web Speak Windows Adds basic speech to Web pages $20 Nepean, Ontario 613-596-0048 www.shadisoft.com William F.
    [Show full text]
  • Php Editor Mac Freeware Download
    Php editor mac freeware download Davor's PHP Editor (DPHPEdit) is a free PHP IDE (Integrated Development Environment) which allows Project Creation and Management, Editing with. Notepad++ is a free and open source code editor for Windows. It comes with syntax highlighting for many languages including PHP, JavaScript, HTML, and BBEdit costs $, you can also download a free trial version. PHP editor for Mac OS X, Windows, macOS, and Linux features such as the PHP code builder, the PHP code assistant, and the PHP function list tool. Browse, upload, download, rename, and delete files and directories and much more. PHP Editor free download. Get the latest version now. PHP Editor. CodeLite is an open source, free, cross platform IDE specialized in C, C++, PHP and ) programming languages which runs best on all major Platforms (OSX, Windows and Linux). You can Download CodeLite for the following OSs. Aptana Studio (Windows, Linux, Mac OS X) (FREE) Built-in macro language; Plugins can be downloaded and installed from within jEdit using . EditPlus is a text editor, HTML editor, PHP editor and Java editor for Windows. Download For Mac For macOS or later Release notes - Other platforms Atom is a text editor that's modern, approachable, yet hackable to the core—a tool. Komodo Edit is a simple, polyglot editor that provides the basic functionality you need for programming. unit testing, collaboration, or integration with build systems, download Komodo IDE and start your day trial. (x86), Mac OS X. Download your free trial of Zend Studio - the leading PHP Editor for Zend Studio - Mac OS bit fdbbdea, Download.
    [Show full text]
  • Learning PHP 5 by David Sklar
    Learning PHP 5 By David Sklar Ripped by: Lilmeanman Dedication To Jacob, who can look forward to so much learning. Preface Boring web sites are static. Interesting web sites are dynamic. That is, their content changes. A giant static HTML page listing the names, pictures, descriptions, and prices of all 1,000 products a company has for sale is hard to use and takes forever to load. A dynamic web product catalog that lets you search and filter those products so you see only the six items that meet your price and category criteria is more useful, faster, and much more likely to close a sale. The PHP programming language makes it easy to build dynamic web sites. Whatever interactive excitement you want to create—such as a product catalog, a blog, a photo album, or an event calendar—PHP is up to the task. And after reading this book, you'll be up to the task of building that dynamic web site, too. Who This Book Is For This book is for: • A hobbyist who wants to create an interactive web site for himself, his family, or a nonprofit organization. • A web site builder who wants to use the PHP setup provided by an ISP or hosting provider. • A small business owner who wants to put her company on the Web. • A page designer who wants to communicate better with her developer co-workers. • A JavaScript whiz who wants to build server-side programs that complement her client-side code. • A blogger or HTML jockey who wants to easily add dynamic features to her site.
    [Show full text]
  • Andrew John Oliver
    Andrew John Oliver (307) 690 7382 3832 Tierra Zafiro [email protected] El Paso, TX 79938 OBJECTIVE Acquire a challenging position in software development, software testing, or web programming. EDUCATION B.S. Computer Science. Tract: Mathematics. Univ of Texas at Austin. Aug, 2002. EXPERIENCE 03/04 - 10/05 Data Conversion Specialist, Teton Data Systems, Jackson Hole, WY Duties: Convert text files into HTML and RTF file formats from SGML, XML, and Quark Xpress Tags using data filters written in C++ and C#. Updating and debugging the filters was a major part of this job. 01/05 - 01/06 Web Programmer, Riedel Custom Homes, Spring Branch, TX Duties: Create a MySQL database and PHP web application to manage homebuyer's building site and allow homebuyers to view the progress of the home site. The application manages documents for the buyers and builders as well as manages employee and subcontractor information. http://www.riedelhomes.com/homes -- username and password needed to access site, email me if you are interested. 02/03 - 01/06 Web Programmer, American Scooter Center, Austin, TX Duties: Design, implement and maintain a MySQL database and write a commercial application in PHP to access said database, including an Object Oriented shopping cart system. Also utilized session managment and HTML design techniques. http://www.americanscootercenter.com 09/00 - 05/01 Junior Software Engineer, Diverse Solutions, Inc., Austin, TX Duties: Debug and add functionality to a 3D graphing program called Xplotter. The program was used to map very large multi-variable datasets in a fast and efficient manner for the purpose of pharmaceutical research.
    [Show full text]
  • Installation and Configuration
    6 Jun 2007 Drupal Handbook Table of Contents Installation and configuration . 1 System requirements . 2 Client System Requirements . 3 Javascript . 3 CSS . 4 RSS . 4 Browser Specifics . 4 Browser Popularity . 4 Known Problems . 4 Validation . 4 Caveats . 4 HOWTO: Server requirement recommendations for your consulting clients .. 5 Message to the Client . 5 Benchmark . 6 What Drupal.org runs on . 6 Requirements - older versions . 6 Installing Drupal, modules and themes . 8 Installing Drupal . 8 Formatted Drupal 5.x Installation instructions for better readability .. 13 Installation . 13 Changes . 14 Requirements . 14 Optional Requirements . 14 Installation . 14 Drupal Administration . 16 Customizing your theme(s) . 16 Multi-site configuration . 16 More Information . 17 Formatted Drupal 4.7.x Installation instructions for better readability .. 17 Installation . 17 REQUIREMENTS . 18 SERVER CONFIGURATION . 18 OPTIONAL COMPONENTS . 18 INSTALLATION . 19 1. DOWNLOAD DRUPAL . 19 2. CREATE THE DRUPAL DATABASE . 19 3. LOAD THE DRUPAL DATABASE SCHEME . 20 4. CONNECTING DRUPAL . 20 5. CONFIGURE DRUPAL . 21 6. CRON TASKS . 22 DRUPAL ADMINISTRATION . 22 CUSTOMIZING YOUR THEME(S) . 22 UPGRADING . 23 MORE INFORMATION . 23 i Drupal Handbook 6 Jun 2007 10 minute install using PuTTY SSH/Telnet client .. 23. How I installed Drupal: The Eightfold Way . 24. Installing virtual hosts for Drupal sites and subsites .. 25. Mac OS X-specific guidelines . 26. Important notes for MySQL install: . 27. HOWTO: Create a local server environment for drupal using MAMP .. 28. HOWTO: Installing PostgreSQL and MySQL on the same Mac OS X machine .. 29. Installing Drupal on Mac OS X 10.4 Tiger . 30. Installing and Configuring MySQL . 30. Sending mail . 32.
    [Show full text]
  • Installing and Configuring PHP
    05 6205 CH03.qxd 11/20/03 11:27 AM Page 51 CHAPTER 3 Installing and Configuring PHP In the last of the three installation-related chapters, you will acquire, install, and configure PHP and make some basic changes to your Apache installation. In this chapter, you will learn . How to install PHP with Apache on Linux/Unix . How to install PHP with Apache server on Windows . How to test your PHP installation . How to find help when things go wrong . The basics of the PHP language Current and Future Versions of PHP The installation instructions in this chapter refer to PHP version 4.3.3, which is the current version of the software. The PHP Group uses minor release numbers for updates containing security enhancements or bug fixes. Minor releases do not follow a set release schedule; when enhancements or fixes are added to the code and thor- oughly tested, the PHP Group will releases a new version, with a new minor version number. It is possible that by the time you purchase this book, the minor version number will have changed, to 4.3.4 or beyond. If that is the case, you should read the list of changes at http://www.php.net/ChangeLog-4.php for any changes regarding the installation or configuration process, which makes up the bulk of this chapter. Although it is unlikely that any installation instructions will change between minor version updates, you should get in the habit of always checking the changelog of software that you install and maintain. If a minor version change does occur during the time you are reading this book, but no installation changes are noted in the 05 6205 CH03.qxd 11/20/03 11:27 AM Page 52 52 Chapter 3 changelog, simply make a mental note and substitute the new version number wherever it appears in the installation instructions and accompanying figures.
    [Show full text]
  • Bare Bones Software, Inc
    Bare Bones Software : PRODUCTS : BBEDIT Bare Bones Software, Inc. Skip Navigation ● Home ● Company ❍ History ❍ News ❍ Press Releases ❍ Reviews ❍ Privacy Policy ● Products ❍ BBEdit ❍ Mailsmith ❍ TextWrangler ❍ Super Get Info ❍ Clothing ❍ Freeware ❍ Registration ● Support ❍ Overview ❍ BBEdit ❍ Mailsmith ❍ TextWrangler ❍ Super Get Info ❍ FAQ ❍ Developer Info ❍ Discussion Lists ❍ Resources ❍ Technotes ❍ Product Updates ❍ Contact Form ● Store ❍ Home ❍ Customer Service ❍ Find a Reseller ❍ Product Overview ❍ Site Licenses ● Contact ❍ Overview ❍ Sales ❍ Marketing ❍ Technical Support ❍ Webmaster BBEdit PRODUCTS : BBEDIT ● BUY NOW! ● Download Demo ● Product Information ● BBEdit Tour ● Features List ● New in BBEdit 8.2 It doesn't suck.® ● Feature Comparison http://www.barebones.com/products/bbedit/index.shtml (1 of 4)6/20/2005 2:10:38 PM Bare Bones Software : PRODUCTS : BBEDIT ● Reviews BBEdit is the leading professional HTML and text editor for the Macintosh. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product ● Testimonials provides a plethora of features for editing, searching, and manipulation of text. BBEdit transforms ● Glossary Library text with high performance. ● Plug-In Library ● “Built With BBEdit” An intelligent interface provides easy access to BBEdit’s best of class features including grep ● People Using BBEdit pattern matching, search and replace across multiple files, function navigation and syntax coloring ● Register for numerous source code languages, FTP and SFTP open and save, AppleScript, Perl and Mac OS X Unix scripting support, glossary support, and a complete set of HTML tools. ● Requirements ● Updates ● BBEdit-Talk List ● BBEdit-Scripting List ● Technical Support (click the image above to see it full size in a new browser window) With BBEdit, you can..
    [Show full text]
  • An Introduction to HTML
    05 0672325195_ch03.qxd 5/1/03 11:33 AM Page 47 DAY 3 An Introduction to HTML After finishing up the discussions about the World Wide Web and getting orga- nized, with a large amount of text to read and concepts to digest, you’re proba- bly wondering when you’re actually going to get to write a Web page. That is, after all, why you bought the book. Wait no longer! Today, you get to create your very first (albeit brief) Web page, learn about HTML (the language for writing Web pages), and learn about the following: • What HTML is and why you have to use it • What you can and cannot do when you design HTML pages • What HTML tags are and how to use them •How you can use style sheets to control look and feel of your pages What HTML Is—And What It Isn’t Take note of just one more thing before you dive into actually writing Web pages. You should know what HTML is, what it can do, and most importantly what it can’t do. 05 0672325195_ch03.qxd 5/1/03 11:33 AM Page 48 48 Day 3 HTML stands for Hypertext Markup Language. HTML is based on the Standard Generalized Markup Language (SGML), a much larger document-processing system. To write HTML pages, you won’t need to know a whole lot about SGML. However, know- ing that one of the main features of SGML is that it describes the general structure of the content inside documents—rather than its actual appearance on the page or onscreen— does help.
    [Show full text]
  • Ten Things You Don't Know About
    Ten Things You Don’t Know About Vim Who am I? Vi/Vim user for 20 years A student of Vim; not an expert Also user of BBEdit, Sublime, Eclipse, IntelliJ, etc; have used Emacs but never seriously What is Vim? Descendant of Vi, Ex, Ed Modal text editor mostly for programmers Long learning curve is an investment Programming language; full undo tree; plugin system; and syntax highlighting Vim is Upside-Down GUIs are: select an object; then perform an action on it Vim is: pick an action; then apply it to the text delineated by a motion Vi Compatibility Vi compatibility is a bad thing; it means no special Vim features Cure it with one or more of: vim -N ~/.vimrc :set nocompatible Vim >= version 8.0 Plugins Vundle vim-sensible vim-surround ctrlp.vim Help on help (:help :help) on concepts (:help text-objects) on key sequences (:help i_CTRL-V) on settings and variable names (:help ‘compatible’) on Vimscript functions (:help submatch()) on Plugins (:help surround) Visual Mode Turns Vim Upside-Right Again: select some text; then perform an action on it character-wise (v) line-wise (V) block-wise(^V) Text Objects {i, a} + {w, W, s, p, [, (, {, <, t, “, ‘, `} demonstrate vim-surround Editing Multiple Files Buffers Windows Tabs demonstrate Ctrl-P The Mouse Windows & Tabs Visual Mode Drag & Drop Registers The unnamed register “” “*, “+ “= “a-“z or “A-“Z “0-“9 everything else: “_, “:, “., “%, “#, “-, “/, “~ Macros Repetitive work, too big for ‘.’ Edit in a buffer, yank back into a register; use CTRL-V for special characters Interaction with the Shell Shell
    [Show full text]
  • Requirements for Web Developers and Web Commissioners in Ubiquitous
    Requirements for web developers and web commissioners in ubiquitous Web 2.0 design and development Deliverable 3.2 :: Public Keywords: web design and development, Web 2.0, accessibility, disabled web users, older web users Inclusive Future Internet Web Services Requirements for web developers and web commissioners in ubiquitous Web 2.0 design and development I2Web project (Grant no.: 257623) Table of Contents Glossary of abbreviations ........................................................................................................... 6 Executive Summary .................................................................................................................... 7 1 Introduction ...................................................................................................................... 12 1.1 Terminology ............................................................................................................. 13 2 Requirements for Web commissioners ............................................................................ 15 2.1 Introduction .............................................................................................................. 15 2.2 Previous work ........................................................................................................... 15 2.3 Method ..................................................................................................................... 17 2.3.1 Participants ..........................................................................................................
    [Show full text]
  • Top 10 Free Text Editors for Macos 10.14
    From a general perspective, while looking at text editors for macOS 10.14, we are not specifcally referring to text as we have it in document text. A large chunk of text editors on the market, particularly those that ofer greater capabilities, will turn out to also come with extremely robust features for code compiling. This is where their true potential lies. Today, we will look at 10 best free text editors on macOS 10.14 Top 10 Free Text Editors for macOS 10.14 1. Brackets This is a free text editor macOS 10.14 that is open source and maintained by Adobe Systems — one of the major companies in the industry. One of the outstanding features of Brackets is its beautiful interface. Its unique Extract ofering lets you grab font, gradients measurements, and so on from a PSD fle into a CSS that is clean and ready for use on the web. Pros It comes with extension support which contains a huge and growing library Brackets has inline editors and previews Cons It is slow Brackets still does not have certain elementary text editor commands Its updater is problematic Free Download Brackets 2. TextWrangler Developed by Bare Bones, TextWrangler is another best text editor on macOS 10.14. This tool can be regarded as a lightweight version of BBEdit, also designed by Bare Bones. It has all the features needed by hardcore developers to carry out operations in specifc columns in a CSV, or in a server admin for scriptwriting. Pros It ofers basic text editing as well as manipulations TextWrangler is a free yet ideal alternative to BBEdit It has an inbuilt FTP or STFP browser It is robust and fast to start up Cons It isn’t maintained any longer Free Download TextWrangler 3.
    [Show full text]
  • Python Setup and Usage Release 3.4.3
    Python Setup and Usage Release 3.4.3 Guido van Rossum and the Python development team July 16, 2015 Python Software Foundation Email: [email protected] Contents 1 Command line and environment3 1.1 Command line............................................3 1.2 Environment variables........................................7 2 Using Python on Unix platforms 11 2.1 Getting and installing the latest version of Python.......................... 11 2.2 Building Python........................................... 12 2.3 Python-related paths and files.................................... 12 2.4 Miscellaneous............................................ 12 2.5 Editors................................................ 12 3 Using Python on Windows 15 3.1 Installing Python........................................... 15 3.2 Alternative bundles.......................................... 15 3.3 Configuring Python......................................... 15 3.4 Python Launcher for Windows.................................... 17 3.5 Additional modules......................................... 21 3.6 Compiling Python on Windows................................... 21 3.7 Other resources............................................ 22 4 Using Python on a Macintosh 23 4.1 Getting and Installing MacPython.................................. 23 4.2 The IDE............................................... 24 4.3 Installing Additional Python Packages................................ 24 4.4 GUI Programming on the Mac.................................... 24 4.5 Distributing Python Applications
    [Show full text]