Book description
Python Phrasebook
Brad Dayley
Essential Code and Commands
Python Phrasebook gives you the code phrases you need to quickly and effectively complete your programming projects in Python.
Concise and Accessible
Easy to carry and easy to use–lets you ditch all those bulky books for one portable guide
Flexible and Functional
Packed with more than 100 customizable code snippets–so you can readily code functional Python in just about any situation
Brad Dayley is a software engineer at Novell, Inc. He has been a system administrator and software developer on the Unix, Windows, Linux, and NetWare platforms for the past 14 years. Brad co-developed an advanced debugging course used to train engineers and customers and is the co-author of several Novell Press books.
Programming / Python
Table of contents
-
Python Phrasebook
- About the Author
- Acknowledgments
-
Introduction
- 1. Understanding Python
-
2. Manipulating Strings
-
- Comparing Strings
- Joining Strings
- Splitting Strings
- Searching Strings for Substrings
- Search and Replace in Strings
- Searching Strings for Specific Endings/Beginnings
- Trimming Strings
- Aligning/Formatting Strings
- Executing Code Inside Strings
- Interpolating Variables Inside Strings
- Converting Unicode to Local Strings
- 3. Managing Data Types
-
4. Managing Files
-
- Opening and Closing Files
- Reading an Entire File
- Reading a Single Line from a File
- Accessing Each Word in a File
- Writing a File
- Determining the Number of Lines in a File
- Walking the Directory Tree
- Renaming Files
- Recursively Deleting Files and Subdirectories
- Searching for Files Based on Extension
- Creating a TAR File
- Extracting a File from a TAR File
- Adding Files to a ZIP File
- Retrieving Files from a ZIP File
- 5. Managing Threads
-
6. Managing Databases
-
- Adding Entries to a DBM File
- Retrieving Entries from a DBM File
- Updating Entries in a DBM File
- Pickling Objects to a File
- Unpickling Objects from a File
- Storing Objects in a Shelve File
- Retrieving Objects from a Shelve File
- Changing Objects in a Shelve File
- Connecting to a MySQL Database Server
- Creating a MySQL Database
- Adding Entries to a MySQL Database
- Retrieving Entries from a MySQL Database
- 7. Implementing Internet Communication
- 8. Processing HTML
- 9. Processing XML
-
10. Programming Web Services
-
- Adding HTML to Web Pages Using CGI Scripts
- Processing Parameters Passed to CGI Scripts
- Creating Self-Posting CGI Scripts
- Allowing Users to Upload Files via CGI Scripts
- Creating an HTTP Server to Handle GET Requests
- Creating an HTTP Server to Handle POST Requests
- Creating an HTTP Server to Process CGI Scripts
- Sending an HTTP GET Request from a Python Script
- Sending an HTTP POST Request from a Python Script
- Creating an XML-RPC Server
- Creating an XML-RPC Client
- Using SOAPpy to Access SOAP Web Services Through a WSDL File
Product information
- Title: Python Phrasebook: Essential Code and Commands
- Author(s):
- Release date: November 2006
- Publisher(s): Sams
- ISBN: None
You might also like
article
Use Github Copilot for Prompt Engineering
Using GitHub Copilot can feel like magic. The tool automatically fills out entire blocks of code--but …
article
Splitting Strings on Any of Multiple Delimiters
Build your knowledge of Python with this Shortcuts collection. Focusing on common problems involving text manipulation, …
book
Securing Open Source Libraries
Open source software is amazing, but it’s also a complicated beast when it comes to ownership, …
article
Run Llama-2 Models
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …