Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword or section
Like this
1Activity
×

Table Of Contents

Preface
Who This Book Is For
History Lesson
Status of the book
Official Website
License Terms
Feedback
Something To Think About
Introduction
Features of Python
Why not Perl?
What Programmers Say
For Linux/BSD users
For Windows Users
Summary
Using the interpreter prompt
Example 3.1. Using the python interpreter prompt
Choosing an Editor
Using a Source File
How It Works
Executable Python programs
Getting Help
Literal Constants
Numbers
Strings
Variables
Identifier Naming
Data Types
Objects
Example 4.1. Using Variables and Literal constants
Output
Logical and Physical Lines
Indentation
Chapter 5. Operators and Expressions
Operators
Table 5.1. Operators and their usage
Operator Precedence
Table 5.2. Operator Precedence
Order of Evaluation
Associativity
Expressions
Using Expressions
Chapter 6. Control Flow
The if statement
Using the if statement
Example 6.1. Using the if statement
The while statement
Using the while statement
Example 6.2. Using the while statement
The for loop
Using the for statement
Example 6.3. Using the for statement
The break statement
Using the break statement
Example 6.4. Using the break statement
The continue statement
Using the continue statement
Example 6.5. Using the continue statement
Defining a Function
Function Parameters
Using Function Parameters
Example 7.2. Using Function Parameters
Local Variables
Using Local Variables
Example 7.3. Using Local Variables
Using the global statement
Example 7.4. Using the global statement
Default Argument Values
Using Default Argument Values
Example 7.5. Using Default Argument Values
Keyword Arguments
Using Keyword Arguments
Example 7.6. Using Keyword Arguments
The return statement
Using the literal statement
Example 7.7. Using the literal statement
DocStrings
Using DocStrings
Using the sys module
Example 8.1. Using the sys module
Byte-compiled .pyc files
The from..import statement
A module's __name__
Using a module's __name__
Example 8.2. Using a module's __name__
Making your own Modules
Creating your own Modules
Example 8.3. How to create your own module
from..import
The dir() function
Using the dir function
Example 8.4. Using the dir function
List
Quick introduction to Objects and Classes
Using Lists
Tuple
Using Tuples
Tuples and the print statement
Example 9.3. Output using tuples
Dictionary
Using Dictionaries
Sequences
Using Sequences
References
Objects and References
Example 9.6. Objects and References
More about Strings
String Methods
Chapter 10. Problem Solving - Writing a Python Script
The Problem
The Solution
First Version
Example 10.1. Backup Script - The First Version
Second Version
Example 10.2. Backup Script - The Second Version
Third Version
Example 10.3. Backup Script - The Third Version (does not work!)
Fourth Version
Example 10.4. Backup Script - The Fourth Version
More Refinements
The Software Development Process
The self
Classes
Creating a Class
object Methods
Using Object Methds
Example 11.2. Using Object Methods
The __init__ method
Using the __init__ method
Example 11.3. Using the __init__ method
Class and Object Variables
Using Class and Object Variables
Example 11.4. Using Class and Object Variables
Inheritance
Using Inheritance
Files
Using file
Pickle
Pickling and Unpickling
Errors
Try..Except
Handling Exceptions
Example 13.1. Handling Exceptions
Raising Exceptions
How To Raise Exceptions
Example 13.2. How to Raise Exceptions
Try..Finally
Using Finally
The sys module
Command Line Arguments
More sys
The os module
Special Methods
Table 15.1. Some Special Methods
Single Statement Blocks
List Comprehension
Using List Comprehensions
Example 15.1. Using List Comprehensions
Receiving Tuples and Lists in Functions
Lambda Forms
Using Lambda Forms
The exec and eval statements
The assert statement
The repr function
Explore More
Appendix A. Free/Libré and Open Source Software (FLOSS)
Colophon
About the Author
Timestamp
0 of .
Results for:
No results containing your search query
P. 1
byteofpython_120

byteofpython_120

Ratings: (0)|Views: 2,907|Likes:
Published by RejectingLabels

More info:

Published by: RejectingLabels on Jun 28, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

06/28/2011

pdf

text

original

You're Reading a Free Preview
Pages 7 to 102 are not shown in this preview.
You're Reading a Free Preview
Pages 106 to 110 are not shown in this preview.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->