- A class is like a template
- A colon
- A dot
- A formatting example using string methods
- A tutor
- A twisty maze of codes
- About special package directories
- Absolute imports in Python
- Adding an attribute to an instance
- Adding and changing message headers
- Adding another condition to an if block
- Adding time
- All about class and instance attributes
- All about or
- All about Special Handling
- AlleyOOP Some Object Oriented Programming Concepts
- An instance is a copy made from the template
- An Objects Object Intro to New Style Classes
- Anameis aname except when itsmain
- Applications
- Assigning to a list with slicing
- Assignment always changes
- Asterisk Multiplication
- Augmented assignment doesnt rebind mutable data types
- Avoiding the quirks of default values
- Avoiding unexpected results with integer division
- Being a PUGnosed PIGgie Local User Groups
- Being wordy
- Boolean operators - 2
- Break points
- Briefly meet a few other IDLE commands
- Building a dict out of another dict by using a for loop
- Building lists incrementally
- Builtin functions
- But Wait Theres More The sys Module
- Buy premade bread
- Calling in the Borg Pattern
- Calling the right superclass method
- Cats Cradle Indexing and Slicing
- Changing mutable objects in a shelve database
- Changing the configuration of a logger
- Changing the values of class and instance attributes
- Chapter Accessing the Internet
- Chapter Basic Elements and Syntax
- Chapter Building Applications with Modules and Packages
- Chapter Introducing New Style Classes
- Chapter List - 2 3
- Chapter Processing Lists and Tuples
- Cheese Shop Online Collection of Python Modules
- Choosing between lists and tuples
- Class and Instance Conventions
- Classes
- Classes Just for Data
- Classes modules and functions
- Code block syntax
- Code blocks that create a namespace
- Collecting Globs and Globs of Files
- Combining ingredients
- Combining tests
- Companies that use Python
- Comparatively speaking
- Comparing sequence objects
- Comparison operators - 2
- Compiling regular expressions
- Components of a datetime object
- Converting a sequence
- Create an instance of the Parser class
- Creating a listcomp that applies a filter
- Creating a subclass
- Creating a table
- Creating class methods
- Creating MIME objects via subclasses
- Creating other class attributes
- Cutting through the static about methods
- Data Type Does Matter
- Dealing with duplicate keys
- Dealing with exceptional exceptions
- Debugging in IDLE
- Decorating Your Code
- Deep copying
- Deleting items from a dict
- Designing for expansion
- Dictionaries
- Difference
- Disappearing lists
- Documenting your program
- Dont use the slots machine
- Effects of changing attribute values
- Element attributes
- Encoding binary data into string data
- End the line of code by typing
- Evaluating a string
- Everything comes from object
- Examining a module
- Example of a custom Text Wrapper object
- Example package structure
- Exceptional Type Testing
- Expression and Comprehension Listcomps and Genexps
- Extracting a value
- False objects
- Fast development
- Files
- Finding information about a URL
- Finding largest and smallest items
- Finding out about dict methods
- Finding out more about string methods
- Finding repeats
- Finding whats in standard modules
- Floating Along
- Focusing on Functions
- For loops
- Formatting date and time information
- Formatting floats
- Formatting with multiple data items in a tuple
- Functional versus methodical
- Functions
- Functions for decoding and encoding character sets
- Functions for reading address headers
- Functions that work with or create lists
- Functions versus methods
- Generator expressions
- Generators yield for faster processing
- Gentlemen and ladies unpack your tuples
- Get in
- Getting field values from a table
- Getting help for messy HTML
- Getting help on a function
- Getting Inside the Factory How Class and Instance Namespaces Interact
- Getting loopy with dicts
- Giving another name to a function
- Gotcha Assigning numbers and strings to slices
- Hings to Know about Control Structures
- Home on the range
- Hooking into the power of special methods
- How a string looks inside Python
- How for works
- How local and global names work with assignment
- How local and global names work with references
- Howdy xranger
- Didnt think they would do that
- Ickling Your Data And Relishing the Outcome
- IDLE automatically indents lines for you
- IDLE Musings
- If statements
- If the information is longer than one screen press the spacebar to see more
- If We May Comment
- If you want to write to the file type a comma and w
- Imagining Complex Numbers
- Immutable or frozen sets
- Import all items from a package
- Importing a module in interactive mode
- Importing a module using a different name
- Importing by name
- Importing items from inside a module
- Include debugging code in your script
- Incorrect logic for Boolean expressions
- Individual modules and packages
- Inheriting from a builtin data type
- Inheriting from multiple superclasses
- Initializing a module
- Initializing the spider
- Input
- Interpolating Between the Lines
- Introducing the call function
- Introduction
- Island of Dr MRO
- It pays to be conventional
- Iterables getcher iterables
- Its easier to ask forgiveness than permission
- Lets continue
- Lets pause for a moment
- List comprehensions
- List indexing and slicing
- List indexing and slicing operations
- Listing the contents of an imported module
- Looping around
- Looping through stringsYou can but why would you want to
- Maintaining Your Programs
- Making a saving throw
- Making Exceptions for Yourself
- Making Names and Storing Values
- Making regexes more readable
- Managing strings
- Manipulating directories and their files
- Mapping it out
- Mary had a little lambda
- Measuring and splitting strings
- Mines bigger than yours Comparing strings
- Mirror mirror on the wall whats the object of this all
- Modular Living Storing Your Code in Files
- Module module where is the module
- Modules
- Most punctuation marks come before digits or letters
- Mutable default values can change
- Namespace searching in classes and superclasses
- Numeric data
- Objects
- Official documentation
- On the line beneath your class definition header indent four spaces
- On the next line type four spaces and then type the action you want repeated like this
- On the same line in parentheses specify any of the following keyword arguments separated by commas
- On the same line in parentheses type a message as a string
- On the same line type a file or directory pathname and
- On the same line type a space a space and a tuple that includes one data item for each formatting code in the string as shown here
- On the same line type and the items you want to assign
- On the same line type and the new list element so your line looks something like this
- One quote or two
- Open a command window
- Opening a URL
- Opening IDLE
- Operating on sequence objects
- Operators Are Standing By
- Optional but very important On the next lines write the docstring for the function
- Optional modifiers of the formatting code
- Options for the open function
- Order in the dict
- Order please
- Other useful XML modules
- Out of sorts
- Overview - 2 3 4 5 6
- Parameters versus arguments
- Getting Started
- Appendixes
- Pass values or names for any defaultvalue parameters whose default values you want to override
- Passing information to a method
- Pickling restrictions
- Playing the dealer
- Please repeat String operators
- Press the Return or Enter key
- Processing exception arguments
- Processing special characters in a URL
- Programming styles
- Properties of a shelve object
- Pseudocoding your thoughts
- Python and earlier dont support newstyle classes at all and newstyle classes work differently in than in and later
- Python Batteries Included
- Querying the match object
- Quitting interactive mode
- Raising Your Code to New Levels
- Random Access Reference at httpwwwwikipythonorg
- Raw strings
- Reading data from form fields
- Reading email messages
- Reading the spider web
- Recognizing bare naked functions
- Reductionism
- Regex groups
- Relative imports in Python
- Rememberremember to import modules
- Reminds the user to enter a number We discuss how to do this in Chapter Print statements and traceback logs
- Removing indentation from strings
- Representing an email message in Python
- Representing data
- Representing numbers by using the decimal module
- Retrieving items from dicts
- Reversing Your Way to Success
- Roles
- Run the altered script by typing code like this into your browser replace hostnamecgibin with the path to your cgibin directory and replace scriptname with the name of your script
- Run the cgipy module by typing code like this into your browser replacing hostnamecgibin with the path to your cgibin directory
- Running a script from the command line
- Running the spider
- Saving changes to disk
- Seeing a few logging functions
- Seeing environment variables
- Seeing information about a Python object
- Seeing the result of the last expression
- Seeing whats inside Python objects
- Setting up a basic regex search
- Setting up a readandoutput process
- Setting up a SQLite database
- Setting up CGI output in Python
- Setting up the structure
- Shallow copying
- Shell Game Copying and Moving Files
- Similar items
- Simplifying Choices Using Dicts
- Size limits on floats
- Slicing
- Solving OS Incompatibility The os and subprocess Modules
- Sorting a list of strings
- Sorting out module namespaces
- Special characters
- Specifying a function with an arbitrary number of arguments
- Specifying arguments when you call a function
- Stacking and queuing with lists
- Staying in the Loop
- Staying on Time with the datetime and time Modules
- Storing and retrieving values
- Storing pickles on a shelf
- Stringing Them Along
- StringIO special methods
- Strings Disguised as Files
- Subelements
- Subprocessing
- Super strings
- Sussing Out SQL Databases
- Take a breakor else
- Taking your time
- Taming the Wild URL
- TechnicalHash strings or hash browns
- Technicallocation location location
- Technicalordering up some XML
- Technicalother ways of accessing module attributes
- Technicalprogramming to the max
- Technicalstatements and expressions Seeing the difference
- Technicalteaching an old bug new tricks
- Technicalwhat is Unicode and why do we care about it
- Telling the difference between a class object and a function object
- Testing a dict
- Testing the content of strings
- Testing the elements of a sequence object
- Text Wrapper attributes
- Thanks but Ill pass
- That tricky asterisk
- The actions that list objects can do slice append and so on Inheriting overriding and extending
- The big deal about indentation
- The complangpython Newsgroup
- The embedded Python might not include all the standard Python modules
- The function and class definitions
- The function is designed to work in more than one way depending on which arguments are passed
- The inner lives of iterators
- The kind of error
- The Midas touchUnicode versus str
- The most popular list methods
- The Mothership httpwwwpythonorg
- The Python developer community
- The story of Python
- The Three Ds
- The twoloop tango
- The workings of the Spider class
- The Zen of Python
- Think globally act locally
- Tip Additional regex resources
- Tip When not to use a regex
- Tip When not to use inheritance
- To handle each exception a different way use multiple except clauses
- To run the current line of the program and go to the next line type s
- To run the script from the command line type python i followed by the name of the script including the py suffix
- Tools of the re module
- Tracking down tracebacks
- Training your assistant
- Triplescoop
- True and False arent true and false
- Try statements
- Tryexceptelsefinally Together at last
- Trying an OS command with call
- Trying Things
- Tuple packing
- Turning Python into a Calculator with decimal
- Tutorpythonorg and helppythonorg
- Two Ways to Interact with Python
- Type and the value you want to store
- Type the following
- Understanding default parameters
- Understanding function namespaces
- Understanding shallow copies
- Understanding Web page errors
- Uniquely Ordered Lists
- Unpacking dictionaries
- Unpacking lists or tuples
- Unraveling Unicode
- Updating a dictionary
- Use append to add an item to the end of the queue
- Use properties
- Use the execute method in a for loop to write the addresses into the database
- Use the function in an expression or in an assignment statement
- Useful calling parameters
- Using a debugger
- Using a default value of None to redefine a mutable object
- Using interactive mode as a calculator
- Using Math Modules
- Using multiple inheritance
- Using Scripts and Modules
- Using the interpolation operator
- Using the range function with a list
- Using tryfinally statements
- Using XML files
- Viewing and changing parameters
- Wandering down the ospath
- Warning Maintaining security when using HTML forms
- Ways to escape
- What a list is
- What a tuple is
- What do you really want
- What sets are and arent
- What spiderpy doesnt have
- Whats new in class methods
- Whats That Idiom
- Whats up
- When it comes to or else
- When you want to check that the program is storing the correct values type p and the name to see its value
- When youre reading a text file
- Where did self go
- Why modularizing is a good idea
- Why Python has two kinds of integers
- Why refactor
- Why to while
- With What Your Bare Hands The Power of with Statements
- Working on a copy of a mutable object
- Working with a Zip File object
- Working with attributes
- Working with builtin functions
- Wrapping text by adding newline characters
- Wrapping text by splitting it up
- Writing a base class for your exceptions
- Writing a basic regex
- Writing a script to work in the Web environment
- Writing and editing code with IDLEs text editor
- Writing multiline programs in interactive mode
- You and who else
- You cant use any of Pythons reserved words or keywords
- You Get All This The builtin Module
- You have had a minimal amount of exposure to programming
- You specify that the name is an attribute of a particular object Discovering where Python looks for names
- Zipfile
- Zipping up a Python library