Using OOP for GUIs
Getting Input from a User
A GUI Shelve Interface
Step 6: Adding a Web Interface
CGI Basics
Running a Web Server
Using Query Strings and urllib
Formatting Reply Text
A Web-Based Shelve Interface
The End of the Demo
Part Ⅱ.System Programming
2.System Tools
“The os.path to Knowledge”
Why Python Here?
The Next Five Chapters
System Scripting Overview
Python System Modules
事务场景面试题Module Documentation Sources
Paging Documentation Strings
A Custom Paging Scriptjava new file
String Method Basics
Other String Concepts in Python 3.X: Unicode and bytes File Operation Basics
Using P'rograms in Two Ways
Python Library Manuals
Commercially Published References
Inrroducing the sys Module
Platforms and Versions
The Module Search Path
The Loaded Modules Table
Exception Details
Other sys Module Exports
Introducing the os Module
Tools in the os Module
Administrative Tools
Portability Constants
Common os.path Tools
Running Shell Commands from Scripts
Other os Module Exports
3.Script Execution Context
“I’d Like to Have an Argument, Please”
Current Working Directory
CWD, Files, and Import Paths
CWD and Command Lines
Thread Exits and Shared State
Interprocess Communication
Anonymous Pipes
Named Pipes (Fifos)
Sockets: A First Look
Signals
The multiprocessing Module
Why multiprocessing?
The Basics: Processes and Locks
IPC Tools: Pipes, Shared Memory, and Queues
Starting Independent Programs
And Much More
Why multiprocessing? The Conclusion
Other Ways to Start Programs
The os.spawn Calls
The os.startfile call on Windows
阿司匹林肠溶片副作用有哪些A Portable Program-Launch Framework
Other System Tools Coverage
Command-Line Arguments
Parsing Command-Line Arguments
Shell Environment Variables
Fetching Shell Variables
Changing Shell Variables
Shell Variable Fine Points: Parents, putenv, and getenv
Standard Streams
Redirecting Streams to Files and Programs
Redirected Streams and User Interaction
击穿是什么意思
Redirecting Streams to Python Objects
The io.StringIO and io.Bytesl0 Utility Classes
Capturing the stderr Stream
Redirection Syntax in Print Calls
Other Redirection Options: os.popen and subprocess Revisited 4.File and Directory Tools
“Erase Your Hard Drive in Five Easy Steps!”
File Tools
The File Object Model in Python 3,X
Using Built-in File Objects
Binary and Text Files
Lower-Level File Tools in the os Module
File Scanners
Directory Tools
Walking One Directory
Walking Directory Trees
Handling Unicode Filenames in 3.X: listdir, walk, glob
5.Parallel System Tools
“Telling the Monkeys What to Do”
Forking Processes
The fork/exec Combination
Threads
The _thread Module
The threading Module
The queue Module
Preview: GUIs and Threads
More on the Globallnterpreter Lock
Program Exits
sys Module Exits
os Module Exits
Shell Command Exit Status Codes
Process Exit Status and Shared State
Thread Exits and Shared State
Interprocess Communication
Anonymous Pipes
Named Pipes (Fifos)
web是一种什么文件Sockets: A First Look
Signals
The multiprocessing Module
python编程基础电子版Why multiprocessing?
The Basics: Processes and Locks
IPC Tools: Pipes, Shared Memory, and Queues Starting Independent Programs
And Much More
Why multiprocessing? The Conclusion
Other Ways to Start Programs
The os.spawn Calls
The os.startfile call on Windows
A Portable Program-Launch Framework
Other System Tools Coverage
6.Complete System Programs
“The Greps of Wrath”
A Quick Game of “Find the Biggest Python File”Scanning the Standard Library Directory Scanning the Standard Library Tree
Scanning the Module Search Path
Scanning the Entire Machine
Printing Unicode Filenames
Splitting and Joining Files
Splitting Files Portably
Joining Files Portably
Usage Variations
Generating Redirection Web Pages
Page Template File
Page Generator Script