did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780130410658

Web Programming in Python : Techniques for Integrating Linux, Apache, and My SQL

by ; ;
  • ISBN13:

    9780130410658

  • ISBN10:

    0130410659

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2001-10-01
  • Publisher: Prentice Hall PTR
  • Purchase Benefits
List Price: $44.99

Summary

Python is 100% enterprise ready, with powerful database and XML support, and even a full CORBA implementation. But it's virtually impossible to find a book that shows you Python at work in a real enterprise environment. Web Programming in Python fills that gap, demonstrating exactly how to build robust, Web-based systems that integrate Python with other key open source technologies, including Linux, Apache, and MySQL. The book begins with a quick introduction and self-standing reference to Web programming in Linux environments using Python and Apache. You'll then review Python CGI programming from the ground up, discovering how to generate clean HTML code without adding unnecessary complexity to your code. Once you've mastered the fundamentals of Python Web development, the authors introduce threading, Linux networking, and other advanced techniques for maximizing the program robustness and scalability in. Finally, using a start-to-finish case study, you'll push web technology to its limits, as you build a powerful XML-based, database-driven application that utilizes CORBA distributed components.

Table of Contents

Acknowledgments xvii
Part 1 Foundations 1(430)
Introduction
3(16)
Linux
4(2)
Python
6(4)
Interpreted Environment
6(1)
Rapid Prototyping
7(1)
Object-Oriented Optional
8(1)
Dignified Access to Legacy Code
9(1)
True Portability and Write-Once Run Everywhere
9(1)
Ready for the Enterprise
10(1)
Why Apache?
10(2)
What About MySQL?
11(1)
Book Contents
12(7)
Foundations
13(2)
Modules
15(2)
Applications
17(2)
Introduction to Python
19(58)
Characteristics of Python
19(2)
Executing Programs
21(1)
Interactive Use
21(1)
Scripts in Files
21(1)
Arithmetic Expressions
22(2)
Arithmetic Types
22(2)
Operators
24(2)
Built-In Arithmetic Functions
26(2)
Assignments and Variables
28(1)
Creating Functions
29(1)
Modules
30(3)
Files
33(1)
print Statement
34(1)
while Loops
35(3)
while
35(1)
Example: listfile
35(1)
Relational Expressions
36(1)
Logical Expressions
37(1)
Lists
38(7)
for loops
45(1)
continue
45(1)
break and else in Loops
46(1)
if Statements
47(1)
if else
47(1)
elif
47(1)
pass and One-Line Code Blocks
48(1)
Tuples
48(3)
List Comprehensions
51(1)
None
52(1)
More on Assignment
52(4)
Multiple Assignments
53(1)
Unpacking Sequences
53(1)
Operate and Becomes
54(1)
Evaluation Order
55(1)
Assignment to Local Scope
56(1)
Dictionaries
56(6)
Strings
62(13)
String Literals
62(3)
String Operators
65(5)
The String Module and String Methods
70(3)
Built-In String Functions
73(2)
Summary
75(2)
More Advanced Python
77(66)
Functions
77(8)
Database-Like Operations Using Functions
85(8)
Classes
93(2)
Methods
95(3)
Special Methods: Operator Declarations
98(9)
Object-Oriented Programming
107(11)
Metaprogramming: Analyzing Scopes
118(8)
eval and exec
126(5)
Exceptions
131(11)
Summary
142(1)
Introduction to GNU/Linux
143(72)
Linux Basics
144(5)
File System
149(42)
Text Files in bash
151(8)
Text Files in Python
159(6)
Directories and File Access
165(17)
File Examination and File Name Manipulation in Python
182(4)
File Examination in bash
186(5)
Processes
191(24)
Essentials
191(3)
Creating New Processes in bash
194(9)
Creating Processes in Python
203(6)
Executing New Programs
209(6)
Introduction to Internetworking and HTTP
215(44)
In the Beginning
215(1)
The Network Foundation: The Data Communication Model
216(2)
From OSI to TCP/IP
218(13)
IP Layer
219(6)
Domain Names and the DNS
225(2)
Transport Layer
227(4)
Ports and Sockets
231(2)
HTTP and the World Wide Web
233(25)
A Walk Down Memory Lane
233(3)
HTTP Basics
236(1)
More Advanced HTTP
237(13)
Using lynx and httplib Instead of TELNET
250(1)
Differences between HTTP 1.0 and 1.1
251(1)
Uniform Resource Identifier (URI)
252(6)
Summary
258(1)
Network Setup and Apache Configuration
259(54)
Introduction
259(1)
Assumptions
260(1)
Use Cases
261(2)
Stand-Alone
262(1)
The Intranet
262(1)
The Internet
263(1)
Networking and the DNS Setup
263(22)
Host File Configuration
263(2)
Caching the DNS Setup
265(7)
Configuring Your Intranet
272(7)
Using DNS to Maintain Your Intranet Host Information
279(6)
Apache Web Server Configuration
285(26)
Unconfiguring Preinstalled Apache
285(1)
Reinstalling Apache
286(12)
Postinstallation Configuration Options
298(8)
Sanity-Checking Your Setup
306(5)
Summary
311(2)
CGI Programming in Python
313(48)
Overview
313(1)
Installing CGI Programs
314(2)
GET Method
316(20)
Running CGI Programs
316(5)
Passing Information to a CGI Program
321(5)
Image Maps
326(2)
Data Entry Forms
328(3)
URL Encoding
331(1)
Example: CGI Program to Send an Image
332(1)
Selections
332(4)
Example: Pizza Orders
336(1)
POST Method
336(8)
What POST Method Does
336(6)
File Input
342(2)
Text Areas
344(1)
Processing the Input Stream
344(10)
Do It Yourself
345(1)
Module cgi's Parsing Functions
345(2)
Module cgi's FieldStorage Objects
347(2)
Example: File Submissions
349(5)
Maintaining Context
354(4)
Cookies
355(3)
More Notes on Debugging
358(2)
Summary
360(1)
Database Essentials Featuring MySQL
361(70)
Entities and Relationships
361(3)
Getting Started with MySQL
364(16)
Checking Your Installation and/or Installing MySQL
365(1)
Starting the Server
365(2)
Basic Administration
367(1)
Creating Your Own Account
367(2)
Creating Your Own Database
369(1)
Creating Some Sample Tables
369(4)
More Advanced Access Control
373(7)
SQL Basics
380(9)
Database Management Operations
380(1)
Table Management Operations
380(2)
Basic Data Types
382(6)
Date and Time
388(1)
Essential Table Operations in SQL
389(33)
Creating Tables (CREATE)
390(4)
Populating Tables with Data (INSERT)
394(2)
Selecting Rows
396(3)
Grouping and Ordering
399(2)
Updating Rows in a Table
401(2)
Functions
403(4)
Performing a Basic Join on Two Tables
407(2)
Distinct Clause
409(1)
Column Aliasing
410(1)
Creating Temporary Tables
410(2)
Deleting Rows from a Table
412(3)
Null Testing in the WHERE Clause
415(1)
Altering Table Structure
416(6)
The WPL Database Classes
422(8)
The Record Class
422(3)
DataAccess
425(5)
Summary
430(1)
Part 2 WPL Modules 431(166)
Template Processing with the WriteProcessor
433(64)
String Interpolation
434(8)
Analysis of Python String Interpolation with Respect to the Web
442(1)
SimpleWriter
443(17)
Syntax
444(2)
Basic Design
446(1)
SimpleWriter: The Details
447(13)
The Emitter Strategy Classes
460(4)
The WriteProcessor
464(32)
Principles
465(1)
Basic Template Processing
466(1)
File Inclusion
467(1)
Input from Files or String I/O Objects
468(1)
Looping Rules
468(1)
List Looping Rules
469(5)
List of Dictionary Looping Rules
474(3)
Dictionary Looping Rules
477(4)
Emitters Again
481(1)
Triple-Quote Syntax to Group Input Lines
482(1)
WriteProcessor Design and Implementation
483(7)
WriteProcessor Methods
490(4)
List Looping Rules
494(2)
Summary
496(1)
Form Processing with WebForm
497(28)
Preamble
498(2)
The Design
500(6)
The Overall Approach
500(1)
Form Inputs Organized As Directories
501(3)
File Inputs
504(1)
Support for Handling Undefined Variables
505(1)
Emitter Revisited
505(1)
Cookie Processing
505(1)
Encoders
506(1)
The Code
506(18)
Overview of WebForm Class Structure
506(1)
The Constructor
507(11)
Using WebForm
518(6)
Summary
524(1)
Debugging and Logging Techniques and Tools
525(40)
Python CGI Bugs
525(6)
Goodbye Core Dumps, Hello Stack Trace
526(2)
Dealing with Big Brother: The Web Server
528(1)
Snapshot of the Error without Any State Information
529(2)
Usual Suspects: Resolving Common Python CGI Errors
531(13)
Overoptimized Browsers: Problems with Caches
531(1)
Premature End of Script Error and Friends
532(5)
Lights Are On, but No One Is Home: Browser Hangs
537(1)
Python-Specific CGI Errors
538(6)
Logging
544(20)
Writing Activity to the Standard Streams: stdout and stderr
544(2)
Working with Raw Text Files
546(1)
Writing and Managing Logs:wpl.logger.Logger
547(17)
Summary
564(1)
Miscellaneous Utility Modules and Classes
565(32)
Path
565(3)
Directory
568(18)
Scoped Dictionaries for Python
568(4)
Design and Implementation
572(4)
Interface Methods
576(3)
Using the Directory Class
579(7)
Trace
586(9)
KeyGen
591(4)
Summary
595(2)
Part 3 Applications 597(102)
The Slither Application Development Framework
599(46)
Facilities and Features Common to All Portal Frameworks
600(10)
Factoring Out Repeated Programming Tasks
602(2)
Accessing Server-Side Facilities
604(2)
Structured Processing of Business Logic
606(3)
Working with Dynamic Content
609(1)
Currently Available Frameworks
610(10)
PHP
610(2)
Active Server Pages (ASP)
612(1)
ColdFusion
613(2)
Java Servlets and JSP
615(2)
Zope
617(3)
Slither: A Python-Based Portal Development Platform
620(24)
Bird's-Eye View of Slither
621(3)
Design Philosophy
624(20)
Summary
644(1)
Slither Applications
645(54)
Your First Application: the NumberGame
646(11)
Requirements and Use Cases
646(1)
Design
646(3)
Implementation
649(8)
NumberGame Summary
657(1)
SlyWiki: A Capability-Based Text Collaboration System
657(27)
Functional Requirements
658(1)
Design and Implementation
659(24)
SlyWiki Summary
683(1)
SlyShopping: Selling with Slither
684(14)
Requirements
684(1)
Design and Implementation
685(6)
SlyShopping Logical State Design
691(7)
Summary
698(1)
Appendix A Setting Up Apache and Secure Sockets Layer 699(10)
Configuring Secure HTTP
699(10)
Certificates and Certificate Authorities
700(1)
What Will You Need?
700(1)
Building Secure HTTP
701(2)
Certification
703(6)
Appendix B Modules and Packages 709(14)
Importing Modules
710(1)
Importing Names from Modules
711(1)
Avoiding Namespace Pollution
712(1)
Reloading Modules
713(1)
Search Paths
714(2)
Packages
716(2)
Example Stack Module
718(2)
Critique of Modules
720(1)
Wrap-Up
720(1)
Exercises
721(2)
Bibliography 723(2)
Python
723(1)
Linux
724(1)
Networking
724(1)
HTML
725(1)
Apache Web Server
725(1)
MYSQL
725(1)
Other Web Frameworks
725(1)
Index 725

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program