-
Chapter 1 Introduction
-
Why Python?
-
Motivation
-
The Basics
-
Executing Statements in Python
-
Using Functions in Python
-
Reusing Code with the Import Statement
-
-
Chapter 2 IPython
-
Installing IPython
-
Basic Concepts
-
Help with Magic Functions
-
Unix Shell
-
Information Gathering
-
Automation and Shortcuts
-
Summary
-
-
Chapter 3 Text
-
Python Built-ins and Modules
-
Log Parsing
-
ElementTree
-
Summary
-
-
Chapter 4 Documentation and Reporting
-
Automated Information Gathering
-
Manual Information Gathering
-
Information Formatting
-
Information Distribution
-
Summary
-
-
Chapter 5 Networking
-
Network Clients
-
Remote Procedure Call Facilities
-
SSH
-
Twisted
-
Scapy
-
Creating Scripts with Scapy
-
-
Chapter 6 Data
-
Introduction
-
Using the OS Module to Interact with Data
-
Copying, Moving, Renaming, and Deleting Data
-
Working with Paths, Directories, and Files
-
Comparing Data
-
Merging Data
-
Pattern Matching Files and Directories
-
Wrapping Up rsync
-
Metadata: Data About Data
-
Archiving, Compressing, Imaging, and Restoring
-
Using tarfile Module to Create TAR Archives
-
Using a tarfile Module to Examine the Contents of TAR Files
-
-
Chapter 7 SNMP
-
Introduction
-
Brief Introduction to SNMP
-
IPython and Net-SNMP
-
Discovering a Data Center
-
Retrieving Multiple-Values with Net-SNMP
-
Creating Hybrid SNMP Tools
-
Extending Net-SNMP
-
SNMP Device Control
-
Enterprise SNMP Integration with Zenoss
-
-
Chapter 8 OS Soup
-
Introduction
-
Cross-Platform Unix Programming in Python
-
PyInotify
-
OS X
-
Red Hat Linux Systems Administration
-
Ubuntu Administration
-
Solaris Systems Administration
-
Virtualization
-
Cloud Computing
-
Using Zenoss to Manage Windows Servers from Linux
-
-
Chapter 9 Package Management
-
Introduction
-
Setuptools and Python Eggs
-
Using easy_install
-
easy_install Advanced Features
-
Creating Eggs
-
Entry Points and Console Scripts
-
Registering a Package with the Python Package Index
-
Distutils
-
Buildout
-
Using Buildout
-
Developing with Buildout
-
virtualenv
-
EPM Package Manager
-
-
Chapter 10 Processes and Concurrency
-
Introduction
-
Subprocess
-
Using Supervisor to Manage Processes
-
Using Screen to Manage Processes
-
Threads in Python
-
Processes
-
Processing Module
-
Scheduling Python Processes
-
daemonizer
-
Summary
-
-
Chapter 11 Building GUIs
-
GUI Building Theory
-
Building a Simple PyGTK App
-
Building an Apache Log Viewer Using PyGTK
-
Building an Apache Log Viewer Using Curses
-
Web Applications
-
Django
-
Conclusion
-
-
Chapter 12 Data Persistence
-
Simple Serialization
-
Relational Serialization
-
Summary
-
-
Chapter 13 Command Line
-
Introduction
-
Basic Standard Input Usage
-
Introduction to Optparse
-
Simple Optparse Usage Patterns
-
Unix Mashups: Integrating Shell Commands into Python Command-Line Tools
-
Integrating Configuration Files
-
Summary
-
-
Chapter 14 Pragmatic Examples
-
Managing DNS with Python
-
Using LDAP with OpenLDAP, Active Directory, and More with Python
-
Apache Log Reporting
-
FTP Mirror
-
-
Appendix Callbacks
-
Colophon
- Title:
- Python for Unix and Linux System Administration
- By:
- Noah Gift, Jeremy M. Jones
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- August 2008
- Ebook Release:
- June 2009
- Pages:
- 464
- Print ISBN:
- 978-0-596-51582-9
- | ISBN 10:
- 0-596-51582-0
- Ebook ISBN:
- 978-0-596-15878-1
- | ISBN 10:
- 0-596-15878-5
The image on the cover of Python for Unix and Linux System Administration is a boa constrictor (boa constrictor). Found throughout South and Central America and some islands in the Caribbean, boa constrictors are non-venomous snakes that can thrive in a wide array of environments, from deserts to open savannas and wet tropical forests, but they prefer arid terrain over wet surroundings. They are both terrestrial and arboreal, but as they get older, they tend to spend more time on the ground. Boa constrictors have very unique markings that include diamond- and oval-like patterns. Their scales change colors depending on their habitat, allowing them to hide from the forest-dwelling animals that hunt them. In the wild, boa constrictors thrive on small- to medium-size rodents, lizards, bats, birds, mongooses, squirrels, and have even been known to feast on other mammals as large as ocelots. Being cold-blooded and slow moving, boas can go up to a week without eating after capturing large prey. They are solitary and nocturnal hunters, with heat-sensitive pads on their heads to help them hunt. Particularly fond of bats, boas will hang in trees and from the mouths of caves waiting for them to fly by, then they can grab the bats with their mouths. Not surprisingly, boa constrictors kill by constriction. The snake wraps its body around its prey in coils, tightening its grip each time the victim breathes out, eventually suffocating it to death. Boas are a common attraction in zoos, and they are even relatively common pets. In fact, thousands of dollars are made every year importing them into the U.S. In South America, they are revered as "destroyers of rodents" and are often domesticated for that reason. Boa constrictors grow quite tame in captivity and can live there as such for 20-30 years. Hunted for the exotic pet trade and their decorative markings, some boa constrictors are endangered and have protected status. Boa constrictors are seasonal breeders. To attract males, females emit a scent from their cloacas, which is the chamber into which the intestinal and urogenital tracts discharge. Fertilization happens internally, and females can give birth to up to 60 live babies at one time. Significantly smaller than their anaconda cousins, newborn boas average 2 feet in length and can grow up to 13 feet long and weigh more than 100 pounds. Found in South America, the largest boa constrictor on record was 18 feet!
